Skip to content

Latest commit

 

History

History
3393 lines (2520 loc) · 62.2 KB

File metadata and controls

3393 lines (2520 loc) · 62.2 KB
title language_tabs toc_footers includes search highlight_theme headingLevel
FastAPI v0.1.0
shell
Shell
http
HTTP
javascript
JavaScript
ruby
Ruby
python
Python
php
PHP
java
Java
go
Go
true
darkula
2

FastAPI v0.1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Default

generate_text_stream_stream_post

Code samples

# You can also use wget
curl -X POST /api/stream \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
POST /api/stream HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "prompt": null,
  "use_prompt_format": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/stream',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/api/stream',
  params: {
  'self' => 'any'
}, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/api/stream', params={
  'self': null
}, headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/stream', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/stream");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/stream", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /stream

Generate Text Stream

Body parameter

{
  "prompt": null,
  "use_prompt_format": true
}

Parameters

Name In Type Required Description
self query any true none
body body Prompt true none

Example responses

200 Response

null

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

This operation does not require authentication

start_experimental_start_experimental_post

Code samples

# You can also use wget
curl -X POST /api/start_experimental \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
POST /api/start_experimental HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "models": {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/start_experimental',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/api/start_experimental',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/api/start_experimental', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/start_experimental', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/start_experimental");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/start_experimental", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /start_experimental

Start Experimental

Body parameter

{
  "models": {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
}

Parameters

Name In Type Required Description
body body Body_start_experimental_start_experimental_post true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Start Experimental Start Experimental Post

Name Type Required Restrictions Description
This operation does not require authentication

start_serving_start_serving_post

Code samples

# You can also use wget
curl -X POST /api/start_serving \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'user-name: string'
POST /api/start_serving HTTP/1.1

Content-Type: application/json
Accept: application/json
user-name: string
const inputBody = '[
  {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'user-name':'string'
};

fetch('/api/start_serving',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'user-name' => 'string'
}

result = RestClient.post '/api/start_serving',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'user-name': 'string'
}

r = requests.post('/api/start_serving', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'user-name' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/start_serving', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/start_serving");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "user-name": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/start_serving", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /start_serving

Start Serving

Body parameter

[
  {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
]

Parameters

Name In Type Required Description
user-name header string true none
body body any true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Start Serving Start Serving Post

Name Type Required Restrictions Description
This operation does not require authentication

list_serving_list_serving_get

Code samples

# You can also use wget
curl -X GET /api/list_serving \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'user-name: string'
GET /api/list_serving HTTP/1.1

Content-Type: application/json
Accept: application/json
user-name: string
const inputBody = '[
  {
    "model_id": "string",
    "model_revision": "main"
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'user-name':'string'
};

fetch('/api/list_serving',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'user-name' => 'string'
}

result = RestClient.get '/api/list_serving',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'user-name': 'string'
}

r = requests.get('/api/list_serving', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'user-name' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/list_serving', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/list_serving");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "user-name": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/list_serving", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /list_serving

List Serving

Body parameter

[
  {
    "model_id": "string",
    "model_revision": "main"
  }
]

Parameters

Name In Type Required Description
user-name header string true none
body body any false none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response List Serving List Serving Get

Name Type Required Restrictions Description
This operation does not require authentication

stop_serving_stop_serving_post

Code samples

# You can also use wget
curl -X POST /api/stop_serving \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'user-name: string'
POST /api/stop_serving HTTP/1.1

Content-Type: application/json
Accept: application/json
user-name: string
const inputBody = '[
  {
    "model_id": "string",
    "model_revision": "main"
  }
]';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'user-name':'string'
};

fetch('/api/stop_serving',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'user-name' => 'string'
}

result = RestClient.post '/api/stop_serving',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'user-name': 'string'
}

r = requests.post('/api/stop_serving', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'user-name' => 'string',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/stop_serving', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/stop_serving");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "user-name": []string{"string"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/stop_serving", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /stop_serving

Stop Serving

Body parameter

[
  {
    "model_id": "string",
    "model_revision": "main"
  }
]

Parameters

Name In Type Required Description
user-name header string true none
body body any true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Stop Serving Stop Serving Post

Name Type Required Restrictions Description
This operation does not require authentication

list_deployments_list_deployments_get

Code samples

# You can also use wget
curl -X GET /api/list_deployments \
  -H 'Accept: application/json'
GET /api/list_deployments HTTP/1.1

Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('/api/list_deployments',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/api/list_deployments',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/api/list_deployments', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/list_deployments', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/list_deployments");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/list_deployments", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /list_deployments

List Deployments

Example responses

200 Response

[
  null
]

Responses

Status Meaning Description Schema
200 OK Successful Response Inline

Response Schema

Status Code 200

Response List Deployments List Deployments Get

Name Type Required Restrictions Description
Response List Deployments List Deployments Get [any] false none none
This operation does not require authentication

list_apps_list_apps_get

Code samples

# You can also use wget
curl -X GET /api/list_apps \
  -H 'Accept: application/json'
GET /api/list_apps HTTP/1.1

Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('/api/list_apps',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/api/list_apps',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/api/list_apps', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/list_apps', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/list_apps");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/list_apps", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /list_apps

List Apps

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline

Response Schema

Status Code 200

Response List Apps List Apps Get

Name Type Required Restrictions Description
This operation does not require authentication

list_oob_models_oob_models_get

Code samples

# You can also use wget
curl -X GET /api/oob_models \
  -H 'Accept: application/json'
GET /api/oob_models HTTP/1.1

Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('/api/oob_models',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/api/oob_models',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/api/oob_models', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/oob_models', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/oob_models");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/oob_models", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /oob_models

List Oob Models

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline

Response Schema

Status Code 200

Response List Oob Models Oob Models Get

Name Type Required Restrictions Description
This operation does not require authentication

get_model_models_get

Code samples

# You can also use wget
curl -X GET /api/models \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
GET /api/models HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "models": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/models',
{
  method: 'GET',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.get '/api/models',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.get('/api/models', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/models', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/models");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/models", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /models

Get Model

Body parameter

{
  "models": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body Body_get_model_models_get true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Get Model Models Get

Name Type Required Restrictions Description
This operation does not require authentication

update_model_update_serving_post

Code samples

# You can also use wget
curl -X POST /api/update_serving \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
POST /api/update_serving HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "model": {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/update_serving',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/api/update_serving',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/api/update_serving', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/update_serving', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/update_serving");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/update_serving", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /update_serving

Update Model

Body parameter

{
  "model": {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
}

Parameters

Name In Type Required Description
body body Body_update_model_update_serving_post true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Update Model Update Serving Post

Name Type Required Restrictions Description
This operation does not require authentication

launch_comparation_launch_comparation_post

Code samples

# You can also use wget
curl -X POST /api/launch_comparation \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
POST /api/launch_comparation HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "models": [
    {
      "model_id": "string",
      "model_task": "string",
      "model_revision": "string",
      "is_oob": true,
      "scaling_config": {
        "num_workers": 0,
        "num_gpus_per_worker": 1,
        "num_cpus_per_worker": 1
      }
    }
  ],
  "user": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/launch_comparation',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/api/launch_comparation',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/api/launch_comparation', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/launch_comparation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/launch_comparation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/launch_comparation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /launch_comparation

Launch Comparation

Body parameter

{
  "models": [
    {
      "model_id": "string",
      "model_task": "string",
      "model_revision": "string",
      "is_oob": true,
      "scaling_config": {
        "num_workers": 0,
        "num_gpus_per_worker": 1,
        "num_cpus_per_worker": 1
      }
    }
  ],
  "user": "string"
}

Parameters

Name In Type Required Description
body body Body_launch_comparation_launch_comparation_post true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Launch Comparation Launch Comparation Post

Name Type Required Restrictions Description
This operation does not require authentication

update_comparation_update_comparation_post

Code samples

# You can also use wget
curl -X POST /api/update_comparation \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
POST /api/update_comparation HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "models": [
    {
      "model_id": "string",
      "model_task": "string",
      "model_revision": "string",
      "is_oob": true,
      "scaling_config": {
        "num_workers": 0,
        "num_gpus_per_worker": 1,
        "num_cpus_per_worker": 1
      }
    }
  ],
  "name": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/update_comparation',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/api/update_comparation',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/api/update_comparation', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/update_comparation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/update_comparation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/update_comparation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /update_comparation

Update Comparation

Body parameter

{
  "models": [
    {
      "model_id": "string",
      "model_task": "string",
      "model_revision": "string",
      "is_oob": true,
      "scaling_config": {
        "num_workers": 0,
        "num_gpus_per_worker": 1,
        "num_cpus_per_worker": 1
      }
    }
  ],
  "name": "string"
}

Parameters

Name In Type Required Description
body body Body_update_comparation_update_comparation_post true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Update Comparation Update Comparation Post

Name Type Required Restrictions Description
This operation does not require authentication

models_comparation_models_comparation_get

Code samples

# You can also use wget
curl -X GET /api/models_comparation \
  -H 'Accept: application/json'
GET /api/models_comparation HTTP/1.1

Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('/api/models_comparation',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/api/models_comparation',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/api/models_comparation', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/models_comparation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/models_comparation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/models_comparation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /models_comparation

Models Comparation

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline

Response Schema

Status Code 200

Response Models Comparation Models Comparation Get

Name Type Required Restrictions Description
This operation does not require authentication

list_comparation_list_comparation_get

Code samples

# You can also use wget
curl -X GET /api/list_comparation \
  -H 'Accept: application/json'
GET /api/list_comparation HTTP/1.1

Accept: application/json
const headers = {
  'Accept':'application/json'
};

fetch('/api/list_comparation',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get '/api/list_comparation',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('/api/list_comparation', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/api/list_comparation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/list_comparation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/api/list_comparation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /list_comparation

List Comparation

Example responses

200 Response

[
  null
]

Responses

Status Meaning Description Schema
200 OK Successful Response Inline

Response Schema

Status Code 200

Response List Comparation List Comparation Get

Name Type Required Restrictions Description
Response List Comparation List Comparation Get [any] false none none
This operation does not require authentication

delete_app_delete_comparation_post

Code samples

# You can also use wget
curl -X POST /api/delete_comparation \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'
POST /api/delete_comparation HTTP/1.1

Content-Type: application/json
Accept: application/json
const inputBody = '{
  "names": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/api/delete_comparation',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/api/delete_comparation',
  params: {
  }, headers: headers

p JSON.parse(result)
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/api/delete_comparation', headers = headers)

print(r.json())
<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/delete_comparation', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
URL obj = new URL("/api/delete_comparation");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/api/delete_comparation", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /delete_comparation

Delete App

Body parameter

{
  "names": [
    "string"
  ]
}

Parameters

Name In Type Required Description
body body Body_delete_app_delete_comparation_post true none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Status Code 200

Response Delete App Delete Comparation Post

Name Type Required Restrictions Description
This operation does not require authentication

Schemas

Body_delete_app_delete_comparation_post

{
  "names": [
    "string"
  ]
}

Body_delete_app_delete_comparation_post

Properties

Name Type Required Restrictions Description
names [string] true none model id or all

Body_get_model_models_get

{
  "models": [
    "string"
  ]
}

Body_get_model_models_get

Properties

Name Type Required Restrictions Description
models [string] true none models name

Body_launch_comparation_launch_comparation_post

{
  "models": [
    {
      "model_id": "string",
      "model_task": "string",
      "model_revision": "string",
      "is_oob": true,
      "scaling_config": {
        "num_workers": 0,
        "num_gpus_per_worker": 1,
        "num_cpus_per_worker": 1
      }
    }
  ],
  "user": "string"
}

Body_launch_comparation_launch_comparation_post

Properties

Name Type Required Restrictions Description
models [ModelConfig] true none none
user string true none none

Body_start_experimental_start_experimental_post

{
  "models": {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
}

Body_start_experimental_start_experimental_post

Properties

Name Type Required Restrictions Description
models any true none none

anyOf

Name Type Required Restrictions Description
» anonymous ModelConfig false none none

or

Name Type Required Restrictions Description
» anonymous string false none none

Body_update_comparation_update_comparation_post

{
  "models": [
    {
      "model_id": "string",
      "model_task": "string",
      "model_revision": "string",
      "is_oob": true,
      "scaling_config": {
        "num_workers": 0,
        "num_gpus_per_worker": 1,
        "num_cpus_per_worker": 1
      }
    }
  ],
  "name": "string"
}

Body_update_comparation_update_comparation_post

Properties

Name Type Required Restrictions Description
models [ModelConfig] true none none
name string true none none

Body_update_model_update_serving_post

{
  "model": {
    "model_id": "string",
    "model_task": "string",
    "model_revision": "string",
    "is_oob": true,
    "scaling_config": {
      "num_workers": 0,
      "num_gpus_per_worker": 1,
      "num_cpus_per_worker": 1
    }
  }
}

Body_update_model_update_serving_post

Properties

Name Type Required Restrictions Description
model ModelConfig true none none

HTTPValidationError

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

HTTPValidationError

Properties

Name Type Required Restrictions Description
detail [ValidationError] false none none

ModelConfig

{
  "model_id": "string",
  "model_task": "string",
  "model_revision": "string",
  "is_oob": true,
  "scaling_config": {
    "num_workers": 0,
    "num_gpus_per_worker": 1,
    "num_cpus_per_worker": 1
  }
}

ModelConfig

Properties

Name Type Required Restrictions Description
model_id string true none none
model_task string true none none
model_revision string true none none
is_oob boolean true none none
scaling_config Scaling_Config_Simple true none none

ModelIdentifier

{
  "model_id": "string",
  "model_revision": "main"
}

ModelIdentifier

Properties

Name Type Required Restrictions Description
model_id string true none none
model_revision string false none none

Prompt

{
  "prompt": null,
  "use_prompt_format": true
}

Prompt

Properties

Name Type Required Restrictions Description
prompt any false none none
use_prompt_format boolean false none none

Scaling_Config_Simple

{
  "num_workers": 0,
  "num_gpus_per_worker": 1,
  "num_cpus_per_worker": 1
}

Scaling_Config_Simple

Properties

Name Type Required Restrictions Description
num_workers integer true none none
num_gpus_per_worker number false none none
num_cpus_per_worker number false none none

ValidationError

{
  "loc": [
    "string"
  ],
  "msg": "string",
  "type": "string"
}

ValidationError

Properties

Name Type Required Restrictions Description
loc [anyOf] true none none

anyOf

Name Type Required Restrictions Description
» anonymous string false none none

or

Name Type Required Restrictions Description
» anonymous integer false none none

continued

Name Type Required Restrictions Description
msg string true none none
type string true none none