Sessions
Create session
Create a Session for a saved Agent, or for an inline Agent defined in the request. The Agent configuration, Skills, and MCP connections are frozen for the lifetime of the Session. With stream=true and an initial input, the 201 response is a Server-Sent Events stream of the first turn instead of a JSON Session. Execution admission (balance and organization status) is checked here.
post/v1/agents/sessions
Request
- Base URL: https://api.sandbase.ai
- URL: https://api.sandbase.ai/v1/agents/sessions
- Auth: one of:
- HTTP bearer
- API key in header X-API-Key
Headers
Idempotency-Keystring
Optional. Send a stable key so retries do not create duplicates.
OpenAI-Beta'agents=v1'
Optional OpenAI SDK header. When present it must be agents=v1.
Request body
Response
Session created. With stream=true, a text/event-stream of the first turn whose first event, agent.session.created, carries the Session.
Changes
No recorded changes to this operation across all 1 revision of this API.