Serverless
Create a new endpoint
Elastic Endpoint Create Request v2
Deployment name
^(?=[A-Za-z])[A-Za-z0-9@._-]{1,20}$Docker registry URL
Docker image name
vllm/vllm-openai:latestMinimum GPU single card VRAM in GB
Minimum GPU single card vCPU count
Minimum GPU single card RAM in GB
Number of workers
Credential ID
Container volume in GB
Initialization command
Service mode: ALB, QUEUE, CUSTOM
QUEUEWebhook URL for receiving task results
^https?://.*OK
message
code
Bad Request
Internal Server Error
Endpoint created successfully
Invalid request parameters
POST /v2/serverless HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 491
{
"name": "my-endpoint",
"imageRegistry": "https://index.docker.io",
"image": "yottalabsai/pytorch:2.9.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04",
"resources": [
{
"region": "eu-1",
"gpuType": "NVIDIA_A100_80G",
"gpuCount": 1
}
],
"minSingleCardVramInGb": 11,
"minSingleCardVcpu": 8,
"minSingleCardRamInGb": 8,
"workers": 1,
"containerVolumeInGb": 100,
"initializationCommand": "/usr/sbin/sshd -D &",
"envVars": [
{
"key": "HF_HOME",
"value": "/workspace/cache"
}
],
"expose": {
"port": 8888,
"protocol": "http"
},
"serviceMode": "ALB"
}{
"message": "success",
"code": 10000,
"data": {
"id": "454421436024210042",
"name": "my-endpoint",
"creator": "[email protected]",
"domain": null,
"imageRegistry": "https://index.docker.io",
"image": "yottalabsai/pytorch:2.9.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04",
"resources": [
{
"region": "eu",
"regionDisplayName": "eu",
"gpuType": "NVIDIA_A100_80G",
"gpuDisplayName": "A100 80G",
"gpuCount": 1,
"singleCardVramInGb": 80,
"singleCardVcpu": 22,
"singleCardRamInGb": 120
}
],
"minSingleCardVramInGb": 11,
"minSingleCardVcpu": 8,
"minSingleCardRamInGb": 8,
"credentialId": null,
"containerVolumeInGb": 100,
"initializationCommand": "/usr/sbin/sshd -D &",
"environmentVars": [
{
"key": "HF_HOME",
"value": "/workspace/cache"
}
],
"expose": {
"port": 8888,
"protocol": "http"
},
"totalWorkers": 1,
"runningWorkers": 0,
"cost": "0",
"perSecondPrice": "0",
"perHourPrice": "0",
"serviceMode": "ALB",
"webhook": null,
"status": "INITIALIZING"
}
}Submit a task to a QUEUE-mode endpoint
454433888363332100Elastic Endpoint Submit Task Request v2
User-defined task ID. Auto-generated UUID if omitted
^[A-Za-z0-9_]*$Task input data
Worker port (1-65535)
8000Process URI on the worker
/v1/chat/completionsWebhook URL for result delivery
^https?://.*Webhook authentication key
OK
message
code
Bad Request
Internal Server Error
Task submitted successfully
Invalid request or non-QUEUE endpoint
Endpoint not found
Serverless unavailable
Serverless does not exist
POST /v2/serverless/{id}/tasks HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"input": "hello",
"workerPort": 8000,
"processUri": "/echo"
}{
"message": "success",
"code": 10000,
"data": {
"taskId": "45236b935d80405f871d473dfa8af4e6"
}
}Start or resume a stopped endpoint
454423236680860400OK
message
successcode
10000data
Bad Request
Internal Server Error
Endpoint started
Endpoint not found
POST /v2/serverless/{id}/start HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": null
}Stop a running endpoint
454423236680860400OK
message
successcode
10000data
Bad Request
Internal Server Error
Endpoint stopped
Endpoint not found
POST /v2/serverless/{id}/stop HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": null
}Delete an endpoint
454423236680860400OK
message
successcode
10000data
Bad Request
Internal Server Error
Endpoint deleted
Endpoint not found
DELETE /v2/serverless/{id} HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": null
}Get details of a specific endpoint
0OK
message
code
Bad Request
Internal Server Error
Endpoint found
Endpoint not found
GET /v2/serverless/{id} HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": {
"id": "449722593352847668",
"name": "my-endpoint",
"status": 1,
"domain": "https://api.example.yotta.ai"
}
}Get all tasks of a QUEUE-mode endpoint
454433888363332100Filter by status: PROCESSING, DELIVERED, SUCCESS, FAILED
FAILED1Example: 110Example: 10OK
message
code
Bad Request
Internal Server Error
Success
Endpoint not found
Serverless unavailable
Serverless does not exist
GET /v2/serverless/{id}/tasks HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": {
"items": [
{
"taskId": "e4d651d217ea4f148acd47c8f7a9dcd8",
"endpointId": "454433888363332084",
"endpointName": "serverless_perceptive_gosling",
"status": "FAILED",
"workerUrl": "http://localhost:8000/echo",
"webhook": null,
"deliveryStatus": "SUCCESS",
"deliveryAttempts": 0,
"error": "task processing failed after 4 attempts: HTTP request failed: Post \"http://localhost:8000/echo\": dial tcp [::1]:8000: connect: connection refused",
"createdAt": "1780848115587",
"deliveredAt": "1780848215095",
"updatedAt": "1780848218470"
}
],
"page": "1",
"size": "10",
"total": "1",
"pages": "1"
}
}Get all elastic endpoints
["INITIALIZING"]Success, returns list of endpoints
message
code
Bad Request
Internal Server Error
Success
GET /v2/serverless HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": [
{
"id": "453690273806663908",
"name": "my-endpoint",
"creator": "[email protected]",
"domain": "https://3g37s2hcqyg4.yottadeos.com",
"imageRegistry": "https://index.docker.io",
"image": "yottalabsai/pytorch:2.9.0-py3.11-cuda12.8.1-cudnn-devel-ubuntu22.04",
"resources": [
{
"region": "eu",
"regionDisplayName": "eu",
"gpuType": "NVIDIA_A100_80G",
"gpuDisplayName": "A100 80G",
"gpuCount": 2,
"singleCardVramInGb": 80,
"singleCardVcpu": 22,
"singleCardRamInGb": 120
}
],
"minSingleCardVramInGb": 11,
"minSingleCardVcpu": 8,
"minSingleCardRamInGb": 8,
"credentialId": null,
"containerVolumeInGb": 100,
"initializationCommand": "/usr/sbin/sshd -D &",
"environmentVars": [
{
"key": "HF_HOME",
"value": "/workspace/cache"
}
],
"expose": {
"port": 8888,
"protocol": "http"
},
"totalWorkers": 1,
"runningWorkers": 0,
"cost": "0.948278",
"perSecondPrice": "0.001122",
"perHourPrice": "4.04",
"serviceMode": "ALB",
"webhook": null,
"status": "INITIALIZING"
}
]
}Scale the number of workers for an endpoint
4544338883633321002OK
message
successcode
10000data
Bad Request
Internal Server Error
Workers scaled
Endpoint not found
PUT /v2/serverless/{id}/workers?count=1 HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": null
}Get details of a specific task
454433888363332100e4d651d217ea4f148acd47c8f7a9dcd8OK
message
code
Bad Request
Internal Server Error
Task found
Endpoint not found
Serverless unavailable
Task does not exist
GET /v2/serverless/{id}/tasks/{taskId} HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": {
"taskId": "e4d651d217ea4f148acd47c8f7a9dcd8",
"endpointId": "454433888363332084",
"endpointName": "serverless_perceptive_gosling",
"status": "DELIVERED",
"workerUrl": "http://localhost:8000/echo",
"webhook": null,
"deliveryStatus": "SUCCESS",
"deliveryAttempts": 0,
"error": null,
"input": "hello",
"output": null,
"headers": null,
"createdAt": "1780848115587",
"updatedAt": "1780848115603",
"deliveredAt": "1780848115603"
}
}Update a specific endpoint
454423236680860400Elastic Endpoint Update Request v2
Deployment name
^(?=[A-Za-z])[A-Za-z0-9@._-]{1,20}$Minimum GPU single card VRAM in GB
Minimum GPU single card vCPU count
Minimum GPU single card RAM in GB
Number of workers
Credential ID
Container volume in GB
Initialization command
Webhook URL for receiving task results
^https?://.*OK
message
code
Bad Request
Internal Server Error
Endpoint updated successfully
Endpoint not found
PATCH /v2/serverless/{id} HTTP/1.1
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 475
{
"name": "serverless_methodical_newton",
"imageRegistry": "https://index.docker.io",
"image": "ynzh0119/pytorch:latest",
"resources": [
{
"region": "us-central-7",
"gpuType": "NVIDIA_PRO6000_96G",
"gpuCount": 1
}
],
"minSingleCardVramInGb": 11,
"minSingleCardVcpu": 8,
"minSingleCardRamInGb": 8,
"workers": 1,
"containerVolumeInGb": 100,
"initializationCommand": "/usr/sbin/sshd -D &",
"envVars": [
{
"key": "HF_HOME",
"value": "/workspace/cache"
}
],
"expose": {
"port": 8888,
"protocol": "http"
},
"serviceMode": "ALB"
}{
"message": "success",
"code": 10000,
"data": {
"id": "449722593352847668",
"name": "my-endpoint",
"status": 1,
"domain": "https://api.example.yotta.ai"
}
}Get task statistics grouped by status
454433888363332100OK
message
code
Bad Request
Internal Server Error
Success
Endpoint not found
Serverless unavailable
Serverless does not exist
GET /v2/serverless/{id}/tasks/count HTTP/1.1
x-api-key: YOUR_API_KEY
Accept: */*
{
"message": "success",
"code": 10000,
"data": {
"processing": 3
}
}Last updated
Was this helpful?