REST API

The native API: 68 routes for accounts, keys, billing, sandboxes, GPU pods, vendor credentials and partner supply. Everything below the conventions is generated from the same source as the OpenAPI document, so it matches what the API serves.

GEThttps://api.rent.dev/openapi.json

View as Markdown

Conventions

Every route is under https://api.rent.dev. Bodies are JSON with snake_case members. Times are RFC 3339 in UTC. Money is integer micro-USD: 1 USD is 1,000,000.

The request line above answers the OpenAPI 3.1 document. It needs no key and lists these routes with their full schemas.

Authentication

Send an API key as Authorization: Bearer rent_sk_… or as X-API-Key, or an OAuth access token issued by https://auth.rent.dev for the resource https://api.rent.dev. Routes marked "No credentials" need neither.

An OAuth token needs the scope of the area it calls: sandbox, gpu, billing, keys or supply. An API key carries all of them but supply.

The supply routes that manage nodes and earnings take an access token only. Ask for the scope by name, as scope=supply, when you trade a signed assertion for a token.

Errors

A refusal is an RFC 9457 Problem, served as application/problem+json, with a stable code. The status tables below name the codes each route answers; the errors page says what to do about each.

Long-running operations

Work that can outlast a request answers 202 with an Operation and a Location header. Poll GET /v1/operations/{id}, waiting Retry-After seconds between polls. When done is true the Operation holds exactly one of response, the finished resource, or error, a Problem.

Lists

List routes take limit (1 to 200, default 50) and cursor. Each page answers data and next_cursor, which is null on the last page.

Actions on a resource

An action that is not a plain create, read or delete is a colon suffix on the resource:

  • POST /v1/keys/{id}:rotate
  • POST /v1/sandboxes/{id}:extend
  • POST /v1/sandboxes/{id}:pause
  • POST /v1/sandboxes/{id}:resume
  • POST /v1/supply/nodes/{id}:probe
  • POST /v1/supply/nodes/{id}:revoke

A POST under /v1 also takes an Idempotency-Key header; see retrying safely.

Accounts

Keyless signup, agent keys, wallet login and recovery.

Get a single-use nonce for signing up, binding or recovering with an agent key

GEThttps://api.rent.dev/v1/accounts/nonce

No credentials.

StatusMeaning
200A nonce valid for 5 minutes.

Create an account and its first API key

POSThttps://api.rent.dev/v1/accounts

No email and no proof: an empty body creates an account. Send a signed nonce to bind an Ed25519 agent key for recovery at the same time. A keyless signup sent with Idempotency-Key can be retried safely. No credentials.

ParameterInTypeDescription
idempotency-keyheaderstringKeyless signup only. A repeat within 24 hours answers the same account with a new API key that replaces the first (revoked at once), while the account is untouched: its key never used, nothing bound, no balance, no top-up pending. After that a repeat answers 422 idempotency_key_reused and no key. Only a hash of the value is stored; treat it like a secret for those 24 hours.
Body fieldTypeDescription
public_keystringEd25519 public key: 32 bytes, base64url without padding.
noncestring
signaturestringEd25519 signature: 64 bytes, base64url without padding.

The body is optional.

StatusMeaning
201The account and its API key, shown once.
400invalid_request or unsupported_parameter.
401unauthenticated: the signature or nonce did not verify.
409conflict: the agent key is already bound to an account; or idempotency_in_flight: the first signup with this Idempotency-Key is still running after a 5-second wait (a repeat that arrives while it runs waits for it and answers its account).
422idempotency_key_reused: the Idempotency-Key was used with a different request, or its account has been used since.

Bind an Ed25519 agent key to this account

POSThttps://api.rent.dev/v1/accounts/agent-key

The key can then recover the account with a new API key without a spend limit, so an API key with a spend limit cannot bind one (403). Needs an API key or an OAuth access token.

Body fieldTypeDescription
public_keystringRequired. Ed25519 public key: 32 bytes, base64url without padding.
noncestringRequired.
signaturestringRequired. Ed25519 signature: 64 bytes, base64url without padding.
StatusMeaning
201The bound key.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
409conflict: the key is already bound to an account.

Get a new API key with a signed nonce from the bound agent key

POSThttps://api.rent.dev/v1/accounts/recover

No credentials.

Body fieldTypeDescription
public_keystringRequired. Ed25519 public key: 32 bytes, base64url without padding.
noncestringRequired.
signaturestringRequired. Ed25519 signature: 64 bytes, base64url without padding.
StatusMeaning
200The account and a new API key, shown once.
400invalid_request or unsupported_parameter.
401unauthenticated: the signature or nonce did not verify.
404not_found: no account has this key bound.

Get a new API key with a Sign-In with Ethereum message from the bound wallet

POSThttps://api.rent.dev/v1/accounts/wallet-login

No credentials.

Body fieldTypeDescription
messagestringRequired. EIP-4361 (Sign-In with Ethereum) message whose Nonce is a nonce from GET /v1/accounts/nonce. EIP-4361 nonces are alphanumeric, so write the nonce's 32 bytes as 64 hex characters; a nonce that is already alphanumeric (no - or _) is also accepted as is. Single use, spent once the signature verifies.
signaturestringRequired.
StatusMeaning
200The account and a new API key, shown once.
400invalid_request or unsupported_parameter.
401unauthenticated: the message or signature did not verify.
404not_found: no account is bound to this wallet.

List the agent keys bound to this account

GEThttps://api.rent.dev/v1/accounts/agent-keys

Each one recovers the account (POST /v1/accounts/recover) and signs agent grants. Needs an API key or an OAuth access token.

StatusMeaning
200The bound keys.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Unbind an agent key

DELETEhttps://api.rent.dev/v1/accounts/agent-keys/{public_key}

From now on the key recovers nothing and its signed assertions mint no token for this account. Never refused for being the last binding: the account keeps its API keys. Needs an API key or an OAuth access token.

ParameterInTypeDescription
public_keypathstringRequired. Ed25519 public key: 32 bytes, base64url without padding.
StatusMeaning
200The key unbound.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.

List the wallets bound to this account

GEThttps://api.rent.dev/v1/accounts/wallets

Needs an API key or an OAuth access token.

StatusMeaning
200The bound wallets.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Unbind a wallet

DELETEhttps://api.rent.dev/v1/accounts/wallets/{chain}/{address}

From now on the wallet no longer logs in to this account (POST /v1/accounts/wallet-login). A later payment from it without an API key starts a new account. Needs an API key or an OAuth access token.

ParameterInTypeDescription
chainpathstringRequired.
addresspathstringRequired.
StatusMeaning
200The wallet unbound.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.

List the people linked to this account

GEThttps://api.rent.dev/v1/accounts/people

People who sign in with a passkey and act for this account through OAuth (the console, the CLI, agents they authorize). Needs an API key or an OAuth access token.

StatusMeaning
200The linked people.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Remove a person from this account

DELETEhttps://api.rent.dev/v1/accounts/people/{user_id}

At once: the person no longer sees or can choose the account, and every OAuth grant and token they hold for it stops working. What they hold for their other accounts is untouched. Needs an API key or an OAuth access token.

ParameterInTypeDescription
user_idpathstringRequired. usr_ followed by a 26-character ULID.
StatusMeaning
200The person removed.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.

Keys

API keys and per-key spend limits.

List API keys

GEThttps://api.rent.dev/v1/keys

Needs an API key or an OAuth access token.

ParameterInTypeDescription
cursorquerystring
limitqueryinteger, 1 to 200Page size, 1-200; default 50.
StatusMeaning
200Keys, newest first.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Create an API key

POSThttps://api.rent.dev/v1/keys

An API key with a spend limit is a delegated budget: it cannot create keys (403). Use an uncapped key or a signed-in person. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idempotency-keyheaderstringReplays the first response for 24 hours. Reuse with a different payload answers 422; while the first is in flight, 409. A show-once secret (an API key's secret) is never stored: a replay leaves it out and names it in the Show-Once-Omitted header.
Body fieldTypeDescription
namestring
spend_limit_microsinteger or nullInteger micro-USD, zero or more.

The body is optional.

StatusMeaning
201The key with its secret, shown once.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
409idempotency_in_flight or conflict.
422idempotency_key_reused: the key was used with a different payload.

Rename a key or change its spend limit

PATCHhttps://api.rent.dev/v1/keys/{id}

Not open to an API key with a spend limit, for any key including itself (403). Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. key_ followed by a 26-character ULID.
Body fieldTypeDescription
namestring or null
spend_limit_microsinteger or nullNew lifetime limit; null removes it.
StatusMeaning
200The updated key.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.

Replace a key with a new secret, revoking the old one

POSThttps://api.rent.dev/v1/keys/{id}:rotate

An API key with a spend limit may rotate only itself; its successor's limit is what it has left of its limit (never below zero). Rotating another key needs an uncapped key or a signed-in person (403). Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. key_ followed by a 26-character ULID.
idempotency-keyheaderstringReplays the first response for 24 hours. Reuse with a different payload answers 422; while the first is in flight, 409. A show-once secret (an API key's secret) is never stored: a replay leaves it out and names it in the Show-Once-Omitted header.
StatusMeaning
201The new key with its secret, shown once.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.
409idempotency_in_flight or conflict.
422idempotency_key_reused: the key was used with a different payload.

Revoke a key

DELETEhttps://api.rent.dev/v1/keys/{id}

An API key with a spend limit may revoke only itself (403 for another key). Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. key_ followed by a 26-character ULID.
StatusMeaning
200The revoked key.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.

Operations

AIP-151 long-running operations.

Poll a long-running operation

GEThttps://api.rent.dev/v1/operations/{id}

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. op_ followed by a 26-character ULID.
StatusMeaning
200The operation. While not done, Retry-After says when to poll again. Headers: Retry-After.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.

Quotes

Price per task, own and vendor.

Price per completed task for own sandboxes and published-rate vendors, and GPU rows

GEThttps://api.rent.dev/v1/quotes

No credentials.

ParameterInTypeDescription
profilequeryagent-loop | interactive | workspaceOne profile; default all three.
cpu_countqueryinteger, 1 to 64Default 2.
memory_mbqueryinteger, at least 128Default 4096.
StatusMeaning
200Quotes; cached 60 seconds.
400invalid_request or unsupported_parameter.

Providers

The provider catalog: who sells compute, what they sell and what their terms permit.

List compute providers and their published prices

GEThttps://api.rent.dev/v1/providers

The committed provider catalog: who sells compute, what they sell, and what their terms permit. Offerings carry the GPU axis (gpu, usd_per_gpu_hour) and the CPU axis (cpu, usd_per_vcpu_hour) side by side. A provider whose terms deny display is omitted; one whose terms deny compare is listed with its clause and no prices. A third-party figure keeps its provenance, and attribution names the obligations the response carries. No credentials.

ParameterInTypeDescription
providerquerystringOne provider id.
gpuquerystringCanonical GPU model id (h100-sxm-80gb) or the vendor's own label.
cpuquerystringThe CPU capacity class (shared, dedicated) or the vendor's product label for a CPU offering (e.g. macos), matched without regard to case.
architecturequeryx86_64 | arm64Keep CPU offerings whose architecture the vendor states as this value.
max_usd_per_vcpu_hourquerynumber, at least 0Keep CPU offerings whose usd_per_vcpu_hour is at most this many USD.
pricing_typequeryon_demand | spot | reserved | serverless
coversquerygpu | node | instance | gpu_line_itemKeep offerings whose figure covers this unit (gpu, node, instance, gpu_line_item).
figurequerylisted | effective_dated | weighted_average | median | floor | advertised_fromKeep offerings whose figure was produced this way (listed, floor, …).
gpu_countqueryinteger, at least 1Keep GPU offerings whose gpu.count (GPUs per priced unit) is exactly this many. gpu_count=1 asks for single-GPU offers only.
comparison_groupquerystringKeep offerings in exactly this comparison group; the id an offering carries groups it with the other offers of the same purchasable unit.
regionquerystringA region label or a canonical region id (us-east-1), matched without regard to case; either spelling of a registered place finds every offering in it.
sortqueryprice | price_descOfferings order: price sorts by the comparable hourly figure (per GPU, per vCPU, else per unit) ascending, price_desc descending; offerings without a figure sort last. Default keeps catalog order (provider, product, sku).
max_usd_per_hourquerynumber, at least 0Keep offerings whose hourly figure (usd_per_gpu_hour on a GPU row, else usd_per_hour) is at most this many USD.
provenancequeryfirst_party | third_party
usequeryfetch_automated | store | display | compare | redistribute | deriveThe use the response asserts: only providers permitting it are listed, and only offerings whose publish_mask allows it are carried. Default display.
agenticquerytrue | falsetrue keeps providers with an agentic product; false keeps the rest.
includequeryproviders | offerings | allWhich arrays to carry: providers (default), offerings, or all.
limitqueryinteger, 1 to 200Most members per requested array, 1-200; default 200.
StatusMeaning
200Providers and the offerings matching the filters; cached 60 seconds.
400invalid_request or unsupported_parameter.

Get a provider, its terms and its published prices

GEThttps://api.rent.dev/v1/providers/{id}

One provider with its full terms matrix and the offerings its terms permit publishing. A compare-denied provider answers with its clause and no offerings; a provider whose terms deny display answers 404. No credentials.

ParameterInTypeDescription
idpathstringRequired. Provider id (lowercase slug), e.g. runpod.
StatusMeaning
200The provider and its offerings; cached 60 seconds.
404not_found: no provider with this id is published.

Status

Service health.

Service and endpoint health

GEThttps://api.rent.dev/v1/status

No credentials.

StatusMeaning
200Current status.

Billing

Balance, ledger, Stripe and x402 top-ups, auto-recharge.

Prepaid balance

GEThttps://api.rent.dev/v1/balance

Needs an API key or an OAuth access token.

StatusMeaning
200Total, held and available micro-USD.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Ledger entries, newest first

GEThttps://api.rent.dev/v1/ledger

Needs an API key or an OAuth access token.

ParameterInTypeDescription
cursorquerystring
limitqueryinteger, 1 to 200Page size, 1-200; default 50.
StatusMeaning
200One page of entries.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Create a Stripe Checkout Session to buy credits

POSThttps://api.rent.dev/v1/credits/checkout

Card, Link, US bank account or stablecoin. The fee, max(5.5%, $0.80), is a separate line. Credits land when the payment succeeds. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idempotency-keyheaderstringReplays the first response for 24 hours. Reuse with a different payload answers 422; while the first is in flight, 409. A show-once secret (an API key's secret) is never stored: a replay leaves it out and names it in the Show-Once-Omitted header.
Body fieldTypeDescription
amount_usdstring or numberRequired. Credits to buy, in USD, at most two decimal places. The fee is added on top.
StatusMeaning
201Open checkout_url in a browser.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.
409idempotency_in_flight or conflict.
422idempotency_key_reused: the key was used with a different payload.
502vendor_error: the upstream vendor failed.

Create a Checkout Session that saves a card or Link method for auto-recharge

POSThttps://api.rent.dev/v1/credits/payment-method

Not open to an API key with a spend limit (403): auto-recharge charges the saved method off-session. Use an uncapped key or a signed-in person. Needs an API key or an OAuth access token.

StatusMeaning
201Open checkout_url in a browser.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
502vendor_error: the upstream vendor failed.

Saved card and Link methods

GEThttps://api.rent.dev/v1/billing/payment-methods

Needs an API key or an OAuth access token.

StatusMeaning
200Saved methods.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Auto-recharge settings

GEThttps://api.rent.dev/v1/billing/auto-recharge

Needs an API key or an OAuth access token.

StatusMeaning
200Current settings.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Turn auto-recharge on or off

PUThttps://api.rent.dev/v1/billing/auto-recharge

When available balance falls below the threshold, the saved method is charged off-session for the amount plus the fee. A decline or an SCA request turns it off. Not open to an API key with a spend limit (403): turning it on can charge the saved method at once. Use an uncapped key or a signed-in person. Needs an API key or an OAuth access token.

Body fieldTypeDescription
enabledbooleanRequired.
threshold_usdstring or numberRecharge when available balance falls below this. Required to enable.
amount_usdstring or numberCredits bought per recharge; the fee is added. Required to enable.
payment_method_idstringA saved card or Link method. Required to enable.
StatusMeaning
200The stored settings.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found: no saved method with that id.

Top up with USDC over x402

POSThttps://api.rent.dev/v1/credits/x402

Without a PAYMENT-SIGNATURE header this answers 402 with PAYMENT-REQUIRED: x402 v2 exact on Base, amount = credits + 5.5% rounded up to a base unit. Retry with the signed payment. Credits land after settlement and an on-chain receipt. Without an API key, the paying wallet's account is credited, created if new, and its key returned once. Credentials are optional.

ParameterInTypeDescription
amount_usdquerystringRequired. Credits in USD, at least 0.000001. The 5.5% fee is added to the payment.
payment-signatureheaderstringx402 v2 payment payload.
StatusMeaning
200Settled and credited (also a repeat of a settled payment). Headers: PAYMENT-RESPONSE.
201Settled; the wallet's new account was created and its API key is returned once. Headers: PAYMENT-RESPONSE.
202Accepted: broadcast, not yet confirmed on-chain; poll the Operation at Location. When the payment was sent without an API key and created the paying wallet's account, the body also carries account_id (that account) and api_key (an ApiKeyCreated with its secret, shown once and never again) beside the Operation's members. Headers: Location, Retry-After.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
402Payment required, or the facilitator refused the payment. Headers: PAYMENT-REQUIRED.
GEThttps://api.rent.dev/pay/{token}

The link a 402 Problem carries as topup.checkout_url. Valid 24 hours; no key needed. No credentials.

ParameterInTypeDescription
tokenpathstringRequired.
StatusMeaning
303Redirect to Stripe Checkout. Headers: Location.
404not_found: the token is malformed or its signature does not verify.
410gone: the link has expired.

Sandboxes

Sandboxes on the native API.

Create a sandbox

POSThttps://api.rent.dev/v1/sandboxes

Takes a hold of the ceiling rate times the timeout, places the sandbox and answers 202 with an Operation. With Prefer: wait=<s>, answers 201 with the sandbox when it is ready within the wait. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idempotency-keyheaderstringReplays the first response for 24 hours. Reuse with a different payload answers 422; while the first is in flight, 409. A show-once secret (an API key's secret) is never stored: a replay leaves it out and names it in the Show-Once-Omitted header.
preferheaderstringRFC 7240 wait=<seconds>: answer 201 with the sandbox if it is ready within the wait, else 202.
Body fieldTypeDescription
templatestringTemplate alias: the caller's own or the public set. Default base.
timeout_sinteger, 1 to 86400Seconds until the sandbox stops (or pauses with auto_pause). Default 300.
metadataMetadataCaller metadata. Keys starting rentdev_ are reserved and dropped.
env_varsmap of string to string
auto_pausebooleanPause instead of stopping at the timeout. Default false.
auto_resumebooleanResume a paused sandbox when traffic arrives. Default false.
allow_internet_accessboolean
networkSandboxNetwork
profileagent-loop | interactive | workspaceExpected duty, used for placement when no history exists.
routingSandboxRouting

The body is optional.

StatusMeaning
201Ready within the Prefer wait.
202Accepted: poll the Operation at Location. Headers: Location, Retry-After.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
402insufficient_balance, account_frozen or key_limit_reached, with balance_required_micros and topup links.
403forbidden: the token lacks the scope.
404not_found: unknown template.
409idempotency_in_flight or conflict.
422idempotency_key_reused: the key was used with a different payload.
429rate_limited: the vendor's 429, with its Retry-After.
502vendor_error: the upstream vendor failed.
503no_capacity: no endpoint can place the request now.

List sandboxes

GEThttps://api.rent.dev/v1/sandboxes

Needs an API key or an OAuth access token.

ParameterInTypeDescription
cursorquerystring
limitqueryinteger, 1 to 200Page size, 1-200; default 50.
statequeryrequested | placing | running | paused | settling | terminated | failedOnly leases in this state. Default: every state but terminated and failed.
StatusMeaning
200One page, newest first.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Get a sandbox

GEThttps://api.rent.dev/v1/sandboxes/{id}

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
StatusMeaning
200The sandbox.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.

Terminate a sandbox

DELETEhttps://api.rent.dev/v1/sandboxes/{id}

Stops it and settles: the last usage window is captured and the rest of the hold released. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
StatusMeaning
200The sandbox, settling or terminated.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Set a new timeout

POSThttps://api.rent.dev/v1/sandboxes/{id}:extend

The added time is held on the key that started the sandbox, so an API key with a spend limit cannot extend a sandbox another key started (403). Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
Body fieldTypeDescription
timeout_sinteger, 1 to 86400Required. New timeout, in seconds from now. Takes the added hold first.
StatusMeaning
200The sandbox with its new timeout_at.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
402insufficient_balance, account_frozen or key_limit_reached, with balance_required_micros and topup links.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit and another key started the sandbox (its holds are charged to that key; use the key that started it, an uncapped key or a signed-in person).
404not_found, also for another account's resource.
409conflict: the sandbox is not running.
502vendor_error: the upstream vendor failed.

Pause a sandbox, keeping memory and disk

POSThttps://api.rent.dev/v1/sandboxes/{id}:pause

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
StatusMeaning
200The sandbox, settling then paused.
400unsupported_parameter: the endpoint cannot pause.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
409conflict: the sandbox is not running.
502vendor_error: the upstream vendor failed.

Resume a paused sandbox

POSThttps://api.rent.dev/v1/sandboxes/{id}:resume

The resumed time is held on the key that started the sandbox, so an API key with a spend limit cannot resume a sandbox another key started (403). Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
Body fieldTypeDescription
timeout_sinteger, 1 to 86400Timeout after resuming, in seconds. Default 300.

The body is optional.

StatusMeaning
200The running sandbox.
202Accepted: poll the Operation at Location. Headers: Location, Retry-After.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
402insufficient_balance, account_frozen or key_limit_reached, with balance_required_micros and topup links.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit and another key started the sandbox (its holds are charged to that key; use the key that started it, an uncapped key or a signed-in person).
404not_found, also for another account's resource.
409conflict: the sandbox is not paused.
502vendor_error: the upstream vendor failed.
503no_capacity: no endpoint can place the request now.

Run a command and wait for it

POSThttps://api.rent.dev/v1/sandboxes/{id}/exec

Synchronous, up to timeout_s (default 50). For longer work start a process. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
Body fieldTypeDescription
cmdstringRequired. Shell command, run with /bin/bash -l -c.
cwdstring
envmap of string to string
userstringDefault user.
stdinstringWritten to stdin, then closed.
timeout_sinteger, 1 to 3600Seconds before the command is killed. Default 50.
StatusMeaning
200Output and exit code.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
409conflict: the sandbox is not running.
502vendor_error: the upstream vendor failed.

Start a background process

POSThttps://api.rent.dev/v1/sandboxes/{id}/processes

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
Body fieldTypeDescription
cmdstringRequired.
cwdstring
envmap of string to string
userstring
stdinbooleanKeep stdin open for writes.
StatusMeaning
201The started process.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
409conflict: the sandbox is not running.
502vendor_error: the upstream vendor failed.

Read a process's output after a cursor

GEThttps://api.rent.dev/v1/sandboxes/{id}/processes/{process_id}/output

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
process_idpathstringRequired.
cursorquerystringCursor from the previous read; omit to read from the start.
wait_msqueryinteger, 0 to 30000Wait up to this long for new output before answering. Default 0.
StatusMeaning
200New output and the next cursor.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Write to a process's stdin

POSThttps://api.rent.dev/v1/sandboxes/{id}/processes/{process_id}/stdin

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
process_idpathstringRequired.
Body fieldTypeDescription
datastringRequired.
eofbooleanClose stdin after writing.
StatusMeaning
204Written.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Kill a process

DELETEhttps://api.rent.dev/v1/sandboxes/{id}/processes/{process_id}

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
process_idpathstringRequired.
StatusMeaning
204Killed.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

List a directory

GEThttps://api.rent.dev/v1/sandboxes/{id}/files

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
pathquerystringRequired.
depthqueryinteger, 1 to 10List depth. Default 1.
StatusMeaning
200Entries.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Read a file, streamed

GEThttps://api.rent.dev/v1/sandboxes/{id}/files/content

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
pathquerystringRequired.
depthqueryinteger, 1 to 10List depth. Default 1.
StatusMeaning
200File bytes.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Write a file, streamed

PUThttps://api.rent.dev/v1/sandboxes/{id}/files/content

Creates parent directories. The edge refuses request bodies over 100 MB. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
pathquerystringRequired.
depthqueryinteger, 1 to 10List depth. Default 1.

The body is the file's bytes, sent as application/octet-stream.

StatusMeaning
200The written file.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Public URL of a port inside the sandbox

GEThttps://api.rent.dev/v1/sandboxes/{id}/ports/{port}/url

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
portpathinteger, 1 to 65535Required.
StatusMeaning
200The URL.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.

Run code on the code-interpreter-v1 kernel

POSThttps://api.rent.dev/v1/sandboxes/{id}/run-code

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
Body fieldTypeDescription
codestringRequired.
languagepython | javascript | typescript | r | java | bashDefault python.
context_idstringKernel context to run in; state persists across calls in one context.
envmap of string to string
timeout_sinteger, 1 to 3600Default 50.
StatusMeaning
200Results, output and any error.
400unsupported_parameter: the sandbox is not on code-interpreter-v1.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Sandbox logs as server-sent events

GEThttps://api.rent.dev/v1/sandboxes/{id}/logs

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
last-event-idheaderstringResume after this event.
StatusMeaning
200Server-sent events. Each event has an id and a JSON LogEntry as data; reconnect with Last-Event-ID.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

GPU pods

RunPod GPU pods on your own key.

Create a GPU pod on your own RunPod key

POSThttps://api.rent.dev/v1/gpu-pods

BYOK only: RunPod bills your key; no rent.dev balance is used. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idempotency-keyheaderstringReplays the first response for 24 hours. Reuse with a different payload answers 422; while the first is in flight, 409. A show-once secret (an API key's secret) is never stored: a replay leaves it out and names it in the Show-Once-Omitted header.
Body fieldTypeDescription
gpu_typestringRequired. RunPod GPU type id, as listed by its catalog.
gpu_countinteger, at least 1Default 1.
imagestringRequired.
cloud_typeSECURE | COMMUNITYDefault SECURE.
container_disk_gbinteger, at least 1Default 20.
volume_gbinteger, at least 0Default 0.
portsarray of string
envmap of string to string
credential_idstringRunPod credential to use; default the account's only RunPod credential.
StatusMeaning
201The pod.
202Accepted: poll the Operation at Location. Headers: Location, Retry-After.
400invalid_request, or unsupported_parameter when no RunPod credential is stored.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.
409idempotency_in_flight or conflict.
422idempotency_key_reused: the key was used with a different payload.
429rate_limited: the vendor's 429, with its Retry-After.
502vendor_error: the upstream vendor failed.
503no_capacity: RunPod has none of the asked GPU now (a stock-out), with retry_after; retry later, or ask for another gpu_type or cloud_type.

List GPU pods

GEThttps://api.rent.dev/v1/gpu-pods

Needs an API key or an OAuth access token.

ParameterInTypeDescription
cursorquerystring
limitqueryinteger, 1 to 200Page size, 1-200; default 50.
StatusMeaning
200One page, newest first.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Get a GPU pod

GEThttps://api.rent.dev/v1/gpu-pods/{id}

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
StatusMeaning
200The pod.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.

Terminate a GPU pod

DELETEhttps://api.rent.dev/v1/gpu-pods/{id}

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
StatusMeaning
200The terminated pod.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Pod logs as server-sent events

GEThttps://api.rent.dev/v1/gpu-pods/{id}/logs

Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
last-event-idheaderstringResume after this event.
StatusMeaning
200Server-sent events. Each event has an id and a JSON LogEntry as data; reconnect with Last-Event-ID.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

Run a command in a pod

POSThttps://api.rent.dev/v1/gpu-pods/{id}/exec

RunPod's limits pass through: timeoutSeconds 1-25, output up to 1 MiB. Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. lse_ followed by a 26-character ULID.
Body fieldTypeDescription
commandstringRequired.
timeout_sinteger, at least 1Passed to RunPod as timeoutSeconds; RunPod accepts 1-25 and caps output at 1 MiB, and its errors pass through.
StatusMeaning
200Output and exit code.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
404not_found, also for another account's resource.
502vendor_error: the upstream vendor failed.

BYOK

Vendor credentials.

Store a vendor credential

POSThttps://api.rent.dev/v1/byok/credentials

Checked with one read-only vendor call, then stored encrypted. Never returned. Not open to an API key with a spend limit (403). Needs an API key or an OAuth access token.

Body fieldTypeDescription
vendore2bRequired.
labelstring
fieldsobjectRequired.
Body fieldTypeDescription
vendorvercelRequired.
labelstring
fieldsobjectRequired.
Body fieldTypeDescription
vendorrunpodRequired.
labelstring
fieldsobjectRequired.
StatusMeaning
201The stored credential, without its secret.
400invalid_request: malformed, or the vendor refused the credential.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
502vendor_error: the upstream vendor failed.

List stored vendor credentials

GEThttps://api.rent.dev/v1/byok/credentials

Needs an API key or an OAuth access token.

StatusMeaning
200Ids and vendors only.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Delete a vendor credential

DELETEhttps://api.rent.dev/v1/byok/credentials/{id}

Never refused for what it would leave running: the answer lists every sandbox and GPU pod created with the credential that is still running (orphaned). Those keep running on your own vendor bill, and rent.dev can no longer stop them, run commands in them or read their logs: terminate each one at the vendor (vendor_resource_id is the vendor's id for it). Not open to an API key with a spend limit (403). Needs an API key or an OAuth access token.

ParameterInTypeDescription
idpathstringRequired. cred_ followed by a 26-character ULID.
StatusMeaning
200Deleted, with what is still running on the credential.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope, or the caller is an API key with a spend limit (use an uncapped key or a signed-in person).
404not_found, also for another account's resource.

Usage

Usage and showback.

Own usage billed by rent.dev beside BYOK showback billed by vendors

GEThttps://api.rent.dev/v1/usage

Needs an API key or an OAuth access token.

ParameterInTypeDescription
fromquerystringDefault 30 days ago.
toquerystringDefault now.
StatusMeaning
200Usage for the period.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the scope.

Supply

Partner supply: enrol nodes, manage them and read their earnings.

Enrol nodes: get one single-use claim token per node and the install lines

POSThttps://api.rent.dev/v1/supply/enrollments

Needs a token with the supply scope. Each claim token is shown once and expires after 600 seconds; pass it to the node kit on stdin, never in a process's arguments. An API key is not enough: send an OAuth access token with the supply scope.

Body fieldTypeDescription
wiree2b | rentRequired.
regionstringRequired.
askSupplyAskRequired. What the provider asks per hour, in USD.
capacitySupplyCapacityRequired.
payoutSupplyPayoutPayout details, stored as given; nothing pays out yet.
countinteger, 1 to 1000Claim tokens to make, one per node; default 1.
StatusMeaning
201The claim tokens, shown once, and the install lines.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope. API keys never carry it; ask the agent grant for scope=supply.
503supply_link_unavailable: partner supply is not configured in this environment (owner_action_required, not retryable); or this environment has no node image to install (owner_action_required).

Claim a node with its claim token and a new node key

POSThttps://api.rent.dev/v1/supply/claims

Called by the node kit, with no key: the claim token is the credential, and signature proves the node holds the private half of public_key. Answers the node's link and the platform keys its gate verifies requests with. No credentials.

Body fieldTypeDescription
claim_tokenstringRequired.
public_keystringRequired. Ed25519 public key: 32 bytes, base64url without padding.
signaturestringRequired. The node key over rent.dev claim v1\n{claim_token}\n{public_key}.
agent_versionstringRequired.
wiree2b | rentRequired.
factsSupplyFactsRequired.
checksarray of SupplyCheckResultRequired.
StatusMeaning
201The node, its link, and the next step: start the link.
400invalid_request: the body is malformed, or its wire is not the enrolment's.
401claim_proof_invalid: the proof of possession did not verify.
409node_exists: a live node already holds this host fingerprint.
410claim_invalid: the token is unknown, used or expired (next.action re_enroll).
422checks_failed: a blocking check failed; the checks with their fixes, next.action fix_checks. The token stays unused until it expires.
503supply_link_unavailable: the node's link could not be made; retry after retry_after, or wait for rent.dev when owner_action_required.

List this account's nodes

GEThttps://api.rent.dev/v1/supply/nodes

An API key is not enough: send an OAuth access token with the supply scope.

ParameterInTypeDescription
cursorquerystring
limitqueryinteger, 1 to 200Page size, 1-200; default 50.
StatusMeaning
200One page, newest first.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope. API keys never carry it; ask the agent grant for scope=supply.
503supply_link_unavailable: partner supply is not configured in this environment (owner_action_required, not retryable).

Get a node: its state, checks, next step and placement

GEThttps://api.rent.dev/v1/supply/nodes/{id}

An API key is not enough: send an OAuth access token with the supply scope.

ParameterInTypeDescription
idpathstringRequired.
StatusMeaning
200The node.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope. API keys never carry it; ask the agent grant for scope=supply.
404not_found, also for another account's resource.
503supply_link_unavailable: partner supply is not configured in this environment (owner_action_required, not retryable).

Change a node's ask, capacity, region or payout

PATCHhttps://api.rent.dev/v1/supply/nodes/{id}

A new ask applies to leases placed from now on; running leases keep the rates they were placed at. More slots or a new region sends the node back to probing. Changing payout needs signed_nonce: a nonce from GET /v1/accounts/nonce signed over rent.dev payout v1\n{node_id}\n{nonce}\n{public_key} by the account's agent key. An API key is not enough: send an OAuth access token with the supply scope.

ParameterInTypeDescription
idpathstringRequired.
Body fieldTypeDescription
askSupplyAskWhat the provider asks per hour, in USD.
capacitySupplyCapacity
regionstring
payoutSupplyPayoutPayout details, stored as given; nothing pays out yet.
signed_nonceSignedNonceAn Ed25519 signature over rent.dev signup v1\n{nonce}\n{public_key} (signup, binding) or rent.dev recover v1\n{nonce}\n{public_key} (recovery).
StatusMeaning
200The updated node.
400invalid_request or unsupported_parameter.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope; or payout_proof_required: signed_nonce is not a fresh nonce signed over rent.dev payout v1\n{node_id}\n{nonce}\n{public_key} by an agent key of this account.
404not_found, also for another account's resource.
409conflict: the node changed state while the request ran; send it again.
410node_revoked: the node is revoked.
503supply_link_unavailable: partner supply is not configured in this environment (owner_action_required, not retryable).

Probe a node now

POSThttps://api.rent.dev/v1/supply/nodes/{id}:probe

Schedules the node's adapter probe at once; a suspended node goes back to probing. An API key is not enough: send an OAuth access token with the supply scope.

ParameterInTypeDescription
idpathstringRequired.
StatusMeaning
200The node, its probe due now.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope. API keys never carry it; ask the agent grant for scope=supply.
404not_found, also for another account's resource.
409probe_in_progress: a probe of the node is running; or conflict: the node changed state while the request ran.
410node_revoked: the node is revoked.
503supply_link_unavailable: partner supply is not configured in this environment (owner_action_required, not retryable).

Revoke a node and remove its link

POSThttps://api.rent.dev/v1/supply/nodes/{id}:revoke

No new lease is placed on it. Earnings already accrued stay. An API key is not enough: send an OAuth access token with the supply scope.

ParameterInTypeDescription
idpathstringRequired.
StatusMeaning
200The revoked node.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope. API keys never carry it; ask the agent grant for scope=supply.
404not_found, also for another account's resource.
409conflict: the node changed state while the request ran; send it again.
503supply_link_unavailable: partner supply is not configured in this environment (owner_action_required, not retryable); or the node is revoked but its link could not be removed: send the revoke again.

Accrued earnings of this account's nodes

GEThttps://api.rent.dev/v1/supply/earnings

A lease accrues when it settles; nothing shows while it runs. An accrual becomes releasable after the holdback, longer when the paying account topped up by card. An API key is not enough: send an OAuth access token with the supply scope.

ParameterInTypeDescription
cursorquerystring
limitqueryinteger, 1 to 200Page size, 1-200; default 50.
StatusMeaning
200The totals and one page of entries, newest first.
401unauthenticated: no key, or one that is unknown or revoked.
403forbidden: the token lacks the supply scope. API keys never carry it; ask the agent grant for scope=supply.

The platform keys a node's gate verifies platform requests with

GEThttps://api.rent.dev/v1/supply/keys

No credentials.

StatusMeaning
200Current and retiring keys.

The provider guide, as Markdown

GEThttps://api.rent.dev/v1/supply/guide

No credentials.

StatusMeaning
200The guide.