v1

latestOpenAPI 3.1.02026-07-13897404.3 KB
Machines

set defjob

Creates default jobs (background instances) for a specified machine with the given parameters.

CLI Usage: vastai set defjob <machine_id> --price_gpu <price> --price_inetu <price> --price_inetd <price> --image <image> [--args <args>]

put/api/v0/machines/create_bids/

Request body

machineinteger required

ID of the machine to create jobs for.

price_gpunumber float required

Price per GPU per day.

price_inetunumber float required

Price for internet upload.

price_inetdnumber float required

Price for internet download.

imagestring required

Docker image to use for the job.

argsstring[]

Arguments for the Docker image.

Example request

{
  "machine": 12345,
  "price_gpu": 0.5,
  "price_inetu": 0.1,
  "price_inetd": 0.1,
  "image": "vastai/tensorflow",
  "args": [
    "--arg1",
    "--arg2"
  ]
}

Response

Success response

successboolean
machine_idinteger
user_idinteger
you_sentobject

The original request JSON.

Example response

{
  "success": true,
  "machine_id": 12345,
  "user_id": 67890
}