SandBase · Schema
SessionCreateRequest
Send agent_id, agent, or both.
AI AgentsLLM APIsData APIImage/video APIsSandbox
Properties
| Name | Type | Description |
|---|---|---|
| agent_id | string | Saved Agent ID (`agt_` prefix). |
| version | integer | Agent version. Defaults to the current version. Not allowed with an inline Agent. |
| title | string | |
| agent | object | Agent configuration, validated as in Create Agent. Without agent_id it defines an inline Agent and model is required; inline Agents carry no Skills or MCP connections. With agent_id, each field sent r |
| model | string | Model override for this Session. Must equal agent.model when both are sent. |
| environment | object | OpenAI SDK compatibility only. Sessions always run in the SandBase hosted cloud, so omit this field in direct HTTP calls. The OpenAI SDK requires it; {"type":"openai_hosted"} is accepted and any other |
| input | object | Optional first input: a string, or an array with exactly one message, e.g. [{"role":"user","content":[{"type":"input_text","text":"..."}]}]. A bare object returns 400. |
| metadata | object | |
| stream | boolean | true requires a non-empty input and returns a 201 text/event-stream of the first turn. |
| model_provider | object | |
| github_workspace | objectnull | GitHub repository to clone into /workspace for this Session. Omitted or null uses the Agent's workspace repository, if any, and otherwise clones nothing. The repository must be within the Agent's GitH |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/sandbase-ai/json-schema/sandbase-ai-session-create-request-schema.json",
"title": "SessionCreateRequest",
"description": "Send agent_id, agent, or both.",
"x-generated": "2026-11-23",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/sandbase-ai-openapi.json#/components/schemas/SessionCreateRequest",
"type": "object",
"additionalProperties": false,
"anyOf": [
{
"required": [
"agent_id"
]
},
{
"required": [
"agent"
]
}
],
"properties": {
"agent_id": {
"type": "string",
"description": "Saved Agent ID (`agt_` prefix)."
},
"version": {
"type": "integer",
"minimum": 1,
"description": "Agent version. Defaults to the current version. Not allowed with an inline Agent."
},
"title": {
"type": "string",
"maxLength": 512
},
"agent": {
"type": "object",
"additionalProperties": false,
"description": "Agent configuration, validated as in Create Agent. Without agent_id it defines an inline Agent and model is required; inline Agents carry no Skills or MCP connections. With agent_id, each field sent replaces that field of the saved version for this Session only.",
"properties": {
"model": {
"type": "string",
"maxLength": 200
},
"instructions": {
"type": [
"string",
"null"
]
},
"runtime_profile": {
"type": "string",
"enum": [
"codex",
"claude",
"mcode"
],
"description": "Defaults to codex for an inline Agent."
},
"service_tier": {
"type": [
"string",
"null"
]
},
"tools": {
"type": "array",
"items": {
"type": "object"
}
},
"text": {
"type": "object"
},
"reasoning": {
"type": "object"
},
"multi_agent": {
"type": "object"
}
}
},
"model": {
"type": "string",
"maxLength": 200,
"description": "Model override for this Session. Must equal agent.model when both are sent."
},
"environment": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "openai_hosted"
}
},
"description": "OpenAI SDK compatibility only. Sessions always run in the SandBase hosted cloud, so omit this field in direct HTTP calls. The OpenAI SDK requires it; {\"type\":\"openai_hosted\"} is accepted and any other value returns 400."
},
"input": {
"description": "Optional first input: a string, or an array with exactly one message, e.g. [{\"role\":\"user\",\"content\":[{\"type\":\"input_text\",\"text\":\"...\"}]}]. A bare object returns 400.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"const": "user"
},
"content": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"type": {
"type": "string",
"const": "input_text"
},
"text": {
"type": "string"
}
}
}
}
}
}
}
]
},
"metadata": {
"type": "object",
"maxProperties": 16,
"additionalProperties": {
"type": "string",
"maxLength": 512
}
},
"stream": {
"type": "boolean",
"default": false,
"description": "true requires a non-empty input and returns a 201 text/event-stream of the first turn."
},
"model_provider": {
"$ref": "#/$defs/ModelProvider"
},
"github_workspace": {
"type": [
"object",
"null"
],
"additionalProperties": false,
"required": [
"repository_id"
],
"description": "GitHub repository to clone into /workspace for this Session. Omitted or null uses the Agent's workspace repository, if any, and otherwise clones nothing. The repository must be within the Agent's GitHub connection scope.",
"properties": {
"repository_id": {
"type": "string",
"pattern": "^[0-9]+$",
"description": "GitHub numeric repository ID as a decimal string."
},
"ref": {
"type": "string",
"maxLength": 200,
"description": "Branch to check out. Defaults to the repository's default branch."
},
"connection_id": {
"type": "string",
"maxLength": 64,
"description": "GitHub connection to use. Defaults to the assignment with a workspace repository, or the Agent's only GitHub connection."
}
}
}
},
"$defs": {
"ModelProvider": {
"type": "object",
"additionalProperties": false,
"description": "Write-only model credential. Omit it to run with the calling SandBase API key. Never returned.",
"properties": {
"type": {
"type": "string",
"enum": [
"sandbase",
"custom"
],
"default": "sandbase"
},
"base_url": {
"type": "string",
"format": "uri",
"description": "Required for custom. HTTPS only, without credentials, query, or fragment. Not allowed for sandbase."
},
"api_key": {
"type": "string",
"description": "Required for custom. Optional for sandbase, where it defaults to the calling key."
}
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/sandbase-ai-session-create-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.