Base URL and Authentication
All endpoints are underhttps://api.telnyx.com/v2/ai. Authenticate with a Telnyx API key as a Bearer token. The Telnyx CLI (telnyx-edge sandbox-gpu) calls the same API with the same key, which it stores with telnyx-edge auth api-key set.
sb-… for sandboxes and exec-… for execs.
Access
GPU Sandboxes is available only to fully verified accounts enabled for the invite-only preview. Every endpoint refuses an account that isn’t fully verified, and every endpoint except the access check refuses one that isn’t enabled:Check Access
whitelisted: true means the other endpoints are available as far as the preview goes. Account verification, GPU limits, and the errors below still apply:
Responses
A single object is returned as{"data": {...}}. A list is returned as {"data": [...], "meta": {...}}.
Lists page by number with page[number] (1-based, default 1) and page[size] (default 20, maximum 100):
page[after].
Idempotency
Every side-effecting endpoint accepts anIdempotency-Key header: any client-chosen string of up to 255 characters, such as a UUID.
- Same key, same request, within 24 hours: the stored response is returned, with the same resource ID and status code, and nothing happens twice.
- Same key, different request:
422 idempotency_key_reused. - Same key while the first request is still running:
409 request_in_progress. Retry later. - Failed requests aren’t stored. A retry with the same key after a validation error,
429, or conflict is evaluated afresh.
--idempotency-key on the CLI’s create, exec, terminate, set-tags, and files put.
Long Polls
GET …/wait and GET …/execs/{exec_id}?wait= hold the request for at most 10 seconds and then return 200 with the current state. Larger values are clamped. Loop until the state is final. The CLI’s wait loops for you:
Streaming Connections
The attach WebSockets and the log stream are cut by the edge proxy after about 600 seconds. Both resume without gaps or duplicates: exec attach from a byteoffset, logs from the last event id. Plan to reconnect. The CLI reconnects for you.