Talk to the sandbox's agent (OpenAI Responses API)
POST
/sandboxes/{id}/agent/v1/responses
const url = 'https://api.global.stillbox.example/v1/sandboxes/ws-7k2m9q4x8w3z5r6t/agent/v1/responses';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"input":"example","model":"example","stream":true,"conversation":"example","previous_response_id":"example","instructions":"example","interrupt":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.global.stillbox.example/v1/sandboxes/ws-7k2m9q4x8w3z5r6t/agent/v1/responses \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "input": "example", "model": "example", "stream": true, "conversation": "example", "previous_response_id": "example", "instructions": "example", "interrupt": true }'Set an OpenAI SDK’s base URL to
<api>/v1/sandboxes/{id}/agent/v1 to use it. conversation or previous_response_id continues a
conversation; stream: true returns server-sent events with id fields, which
GET .../conversations/{conversation_id}/events resumes from.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
An OpenAI Responses API request. input is a string or a list of messages; other fields as in OpenAI’s API.
object
input
model
string
stream
boolean
conversation
previous_response_id
string
instructions
string
interrupt
Steer a conversation whose agent is still working: that turn stops, and this message continues the conversation at once. Without it, a message to a busy conversation is refused (409).
boolean
key
additional properties
any
Example generated
{ "input": "example", "model": "example", "stream": true, "conversation": "example", "previous_response_id": "example", "instructions": "example", "interrupt": true}Responses
Section titled “Responses”The response, or its events as they happen
object
Example generated
{}string
The API key is missing or invalid
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}No such sandbox in your organization (or no such file)
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}The sandbox isn’t running, or its server is unreachable right now
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "not_found"}