Sandbox API

Admin

Compute quotas (always). Credential-plane / KeyHive BYOK when KeyHive is enabled; HTTP 410 when SANDBOX_LLM_EGRESS=gateway

Compute quotas (always). Credential-plane / KeyHive BYOK when KeyHive is enabled; HTTP 410 when SANDBOX_LLM_EGRESS=gateway

Every request needs a credential — see Authentication.

Always live: compute quotas. Credential plane: KeyHive BYOK when SANDBOX_LLM_EGRESS=direct (admin key); returns HTTP 410 when egress is gateway. See Provisioning credentials.

MethodPathSummary
GET/sandbox/v1/admin/credential-plane/keysAdmin: list provider key ids (KeyHive; 410 when Gateway egress)
POST/sandbox/v1/admin/credential-plane/keysAdmin: append LLM provider key (KeyHive; 410 when Gateway egress)
DELETE/sandbox/v1/admin/credential-plane/keys/{key_id}Admin: deactivate a provider key (KeyHive; 410 when Gateway egress)
POST/sandbox/v1/admin/credential-plane/keys/{key_id}/rotateAdmin: rotate a provider key (KeyHive; 410 when Gateway egress)
POST/sandbox/v1/admin/credential-plane/teamsAdmin: create team (KeyHive credential plane; 410 when Gateway egress)
POST/sandbox/v1/admin/keyhive/keysAdmin: add LLM provider key (legacy KeyHive path; 410 when Gateway egress)
POST/sandbox/v1/admin/keyhive/teamsAdmin: create team (legacy KeyHive path; 410 when Gateway egress)
DELETE/sandbox/v1/admin/quotas/{tenant}/{project}Admin: delete a tenant/project concurrency quota
GET/sandbox/v1/admin/quotas/{tenant}/{project}Admin: inspect a tenant/project concurrency quota
PUT/sandbox/v1/admin/quotas/{tenant}/{project}Admin: create or replace a tenant/project concurrency quota

Common headers

Accepted on every endpoint on this page.

NameInTypeRequiredDescription
x-correlation-idheaderstringnoEnd-to-end correlation id for this eval run. When set, the gateway and downstream services honor it verbatim in logs, Cloud Trace span attributes, async job payloads, and Langfuse trace.id. When omitted, the gateway generates a ULID and echoes it on the response.

Endpoints

Admin: list provider key ids (KeyHive; 410 when Gateway egress)

GET /sandbox/v1/admin/credential-plane/keys

Parameters

NameInTypeRequiredDescription
namespacequerystringyes

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: append LLM provider key (KeyHive; 410 when Gateway egress)

POST /sandbox/v1/admin/credential-plane/keys

Parameters

NameInTypeRequiredDescription
X-Sandbox-Project-Idheaderstring | nullnoProject to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Idheaderstring | nullnoTenant for this request. Must match the credential's tenant when the credential carries one.

Request body

application/json, required

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: deactivate a provider key (KeyHive; 410 when Gateway egress)

DELETE /sandbox/v1/admin/credential-plane/keys/{key_id}

Parameters

NameInTypeRequiredDescription
key_idpathstringyes

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: rotate a provider key (KeyHive; 410 when Gateway egress)

POST /sandbox/v1/admin/credential-plane/keys/{key_id}/rotate

Parameters

NameInTypeRequiredDescription
key_idpathstringyes

Request body

application/json, required

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: create team (KeyHive credential plane; 410 when Gateway egress)

POST /sandbox/v1/admin/credential-plane/teams

Parameters

NameInTypeRequiredDescription
X-Sandbox-Project-Idheaderstring | nullnoProject to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Idheaderstring | nullnoTenant for this request. Must match the credential's tenant when the credential carries one.

Request body

application/json, required

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: add LLM provider key (legacy KeyHive path; 410 when Gateway egress)

POST /sandbox/v1/admin/keyhive/keys

Parameters

NameInTypeRequiredDescription
X-Sandbox-Project-Idheaderstring | nullnoProject to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Idheaderstring | nullnoTenant for this request. Must match the credential's tenant when the credential carries one.

Request body

application/json, required

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: create team (legacy KeyHive path; 410 when Gateway egress)

POST /sandbox/v1/admin/keyhive/teams

Parameters

NameInTypeRequiredDescription
X-Sandbox-Project-Idheaderstring | nullnoProject to bill and rate-limit this request against. Validated against the credential: a project-scoped token may only name its own project, and gets 403 otherwise. Defaults to the token's project when omitted.
X-Sandbox-Tenant-Idheaderstring | nullnoTenant for this request. Must match the credential's tenant when the credential carries one.

Request body

application/json, required

Responses

StatusDescriptionBody
200Successful Responseobject
410Credential plane off (Gateway egress)
422Validation ErrorHTTPValidationError

Admin: delete a tenant/project concurrency quota

DELETE /sandbox/v1/admin/quotas/{tenant}/{project}

Parameters

NameInTypeRequiredDescription
tenantpathstringyes
projectpathstringyes

Responses

StatusDescriptionBody
200Successful Responseany
422Validation ErrorHTTPValidationError

Admin: inspect a tenant/project concurrency quota

GET /sandbox/v1/admin/quotas/{tenant}/{project}

Parameters

NameInTypeRequiredDescription
tenantpathstringyes
projectpathstringyes

Responses

StatusDescriptionBody
200Successful Responseany
422Validation ErrorHTTPValidationError

Admin: create or replace a tenant/project concurrency quota

PUT /sandbox/v1/admin/quotas/{tenant}/{project}

Parameters

NameInTypeRequiredDescription
tenantpathstringyes
projectpathstringyes

Request body

application/json, required — QuotaPolicyRequest

FieldTypeRequiredDescription
max_concurrentintegeryes

Responses

StatusDescriptionBody
200Successful Responseany
422Validation ErrorHTTPValidationError

Schemas

The object shapes referenced above.

HTTPValidationError

FieldTypeRequiredDescription
detailValidationError[]no

QuotaPolicyRequest

Admin request to set one project or tenant-default concurrency limit.

FieldTypeRequiredDescription
max_concurrentintegeryes

ValidationError

FieldTypeRequiredDescription
locstring | integer[]yes
msgstringyes
typestringyes
inputanyno
ctxobjectno

Machine-readable spec: OpenAPI YAML.