v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Serverless

route

Calls on the serverless engine to retrieve a GPU instance address within your endpoint for processing a request. The engine will return either a ready worker URL or status information if no workers are available.

CLI Usage: vastai route <endpoint> <cost>

post/route/

Request body

endpointstring required

Name of the endpoint

costnumber float required

The estimated compute resources for the request

Example request

{
  "endpoint": "vLLM-Qwen3-8B",
  "cost": 242
}

Response

Success response - either worker assignment or status

OR

Example response

{
  "endpoint": "vLLM-Qwen3-8B",
  "url": "http://192.168.1.10:8000",
  "cost": 242,
  "reqnum": 12345,
  "signature": "a1b2c3d4e5f60708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20",
  "__request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}