Docs - Endpoints

Route

The https://run.vast.ai/route/ endpoint retrieves a worker to process a request.

Inputs #

  • endpoint: The name of the endpoint group to use.
  • api_key: The api_key from Vast.ai associated with the account that controls the endpoint group.
  • cost: The estimated compute resources for the request.

Outputs #

On Successful Worker Return #

  • url: The address of the worker instance to send the request to.
  • reqnum: The request number corresponding to this worker instance. Note that workers expect to receive requests in approximately the same order as these reqnums, but some flexibility is allowed due to potential out-of-order requests caused by concurrency or small delays on the proxy server.
  • signature: The signature signed by the private key corresponding to the public key associated with the autoscaler, available at https://run.vast.ai/pubkey/.
  • endpoint: Same as the input parameter to /route/.
  • cost: Same as the input parameter to /route/.

On Failure to Find Ready Worker #

  • endpoint: Same as the input parameter to /route/.
  • status: The breakdown of workers in your endpoint group by status.

Calling the Route Endpoint in Python #

For a guide on creating a client, refer to this section.