Create Endpoint
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/endpoint/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"endpoint": {
"name": "<string>",
"appName": "<string>",
"workerConfig": [
{
"minNum": 123,
"maxNum": 123,
"freeTimeout": 123,
"maxConcurrent": 123,
"gpuNum": 123
}
],
"ports": [
{
"port": "<string>"
}
],
"policy": [
{
"type": "<string>",
"value": 123
}
],
"image": [
{
"image": "<string>",
"authId": "<string>",
"command": "<string>"
}
],
"products": [
{
"id": "<string>"
}
],
"rootfsSize": 123,
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"clusterID": "<string>",
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"healthy": {
"path": "<string>"
}
}
}'
{
"id": "<string>"
}
Request Headers
Enum: application/json
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
Endpoint configuration details.
Endpoint name. String, length limit: 0-220 characters.
Application name (appears in the URL). This is a customizable part of the Endpoint URL, defaults to the Endpoint ID if not specified.
Worker configuration. The valid range can be dynamically obtained via the parameter range API.
HTTP ports. Only one is supported. Supported port range: 1-65535, except for 2222, 2223, and 2224 which are reserved for internal use.
HTTP port.
Auto-scaling policy. The valid range can be dynamically obtained via the parameter range API.
Policy type. Options:
queue
: Queue latency policy, adjusts the number of workers based on the waiting time of requests in the queue.concurrency
: Queue request policy, automatically adjusts the number of workers based on the number of requests in the queue.
The meaning of value depends on the type:
- If type = queue, value is the queue waiting time in seconds.
- If type = concurrency, value is the maximum number of requests in the queue.
Image information.
System disk size (GB). Currently, set to a fixed value of 100.
Storage information (GB).
Storage type. Options:
local
: Local storage.network
: Network storage.
Local storage size, currently set to a fixed value of 30. Not required for network storage.
Network storage ID. Not required for local storage.
Mount path. String, length limit: 0-255 characters.
Cluster information. Required when mounting cloud storage, and must match the cluster ID where the cloud storage resides. String, length limit: 0-255 characters.
Response
The created Endpoint ID.
Was this page helpful?
curl --request POST \
--url https://api.novita.ai/gpu-instance/openapi/v1/endpoint/create \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"endpoint": {
"name": "<string>",
"appName": "<string>",
"workerConfig": [
{
"minNum": 123,
"maxNum": 123,
"freeTimeout": 123,
"maxConcurrent": 123,
"gpuNum": 123
}
],
"ports": [
{
"port": "<string>"
}
],
"policy": [
{
"type": "<string>",
"value": 123
}
],
"image": [
{
"image": "<string>",
"authId": "<string>",
"command": "<string>"
}
],
"products": [
{
"id": "<string>"
}
],
"rootfsSize": 123,
"volumeMounts": [
{
"type": "<string>",
"size": 123,
"id": "<string>",
"mountPath": "<string>"
}
],
"clusterID": "<string>",
"envs": [
{
"key": "<string>",
"value": "<string>"
}
],
"healthy": {
"path": "<string>"
}
}
}'
{
"id": "<string>"
}