Book GPUs
create_bookingSend a GPU request. It is created as requested or queued and becomes running later (use wait_for_deployment); nothing is charged before it runs, then credit is drawn per minute. Quote first with quote_booking and get the user's yes on the total. Retry-safe: see idempotency_key.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"server_id": "<server_id>",
"gpus": "<gpus>",
"hours": "<hours>",
"confirm": "<confirm>"
},
"name": "create_booking"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gpus | Yes | Number of GPUs: one of the server's allowed_gpu_counts. | |
| hours | Yes | Duration in hours. A live booking has a minimum (the API answers duration_below_minimum under it). | |
| image | No | A container image instead of a template. Only images the platform already runs are accepted. | |
| notes | No | A note for the staff who place the request. | |
| confirm | Yes | Must be true. It states that the user approved this exact action after seeing what it does and costs. With a sandbox key (tml_test_…) nothing is real and it may be set freely. | |
| template | No | Template slug from list_templates. Left out: the default PyTorch image. | |
| server_id | Yes | Server id from list_servers. | |
| auto_renew | No | Renew by itself at the end of the term while credit lasts. | |
| renew_hours | No | The renewal block in hours. | |
| sandbox_speed | No | Sandbox keys only: shorten every simulated wait this many times. | |
| ssh_public_key | No | The text of the user's SSH public key (.pub), one key per line. Left out, the keys saved on the account are used. Required with a sandbox key. | |
| idempotency_key | No | Optional. 8 to 128 characters. Reuse the same value when retrying the same request. Left out, one is derived from the request and the UTC date, so the identical request the same day returns the first answer; pass a new value to really do it a second time. | |
| client_reference | No | Your own reference for this deployment; unique among the account's live deployments. | |
| sandbox_scenario | No | Sandbox keys only: the lifecycle to simulate. |