curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/inference' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"provider": "anthropic",
"path": "string",
"body": {},
"secret_name": "YOUR_API_KEY",
"headers": {}
}'
{
"status": 1,
"body": {},
"headers": {}
}
Proxy an LLM inference request
Forwards an inference request to a supported LLM provider from within the sandbox context Served by the live controller (answers 401 unauthenticated) but…
POST
/
api
/
v1
/
sandbox
/
{id}
/
inference
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/inference' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"provider": "anthropic",
"path": "string",
"body": {},
"secret_name": "YOUR_API_KEY",
"headers": {}
}'
{
"status": 1,
"body": {},
"headers": {}
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
/openapi.json — verified 2026-08-31.
Path parameters
string (uuid)
required
Unique sandbox identifier
Request body
InferenceRequest
string
required
LLM provider to route the request to. Allowed values:
'anthropic', 'openai', 'google'.string
required
API path on the provider (e.g., ‘/v1/messages’).
object
required
Request body to forward to the provider.
string
Name of the stored secret containing the provider API key.
object
Additional headers to include in the provider request. Additional keys map to values of type
string.Response
InferenceResponse
integer
HTTP status code from the provider.
object
Response body from the provider.
object
Response headers from the provider. Additional keys map to values of type
string.Status codes
| Code | Meaning |
|---|---|
200 | Inference response from provider |
400 | — |
401 | — |
404 | — |
500 | — |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.sandbox.stateset.app/api/v1/sandbox/{id}/inference' \
--header "Authorization: ApiKey $STATESET_SANDBOX_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"provider": "anthropic",
"path": "string",
"body": {},
"secret_name": "YOUR_API_KEY",
"headers": {}
}'
{
"status": 1,
"body": {},
"headers": {}
}
Last modified on September 21, 2026