Create a none or hosted session
POST/api/agents/v1/{instanceId}/sessions
Create a none or hosted session Set stream=true for SSE, otherwise receive the native session JSON. Keep the same Idempotency-Key for recovery; a changed request with the same key conflicts.
组织 API Key 鉴权
Authorization: Bearer $SINECLOUD_API_KEY所需权限: agentRun
参数
instanceId· path · 必填- An accessible Agents instance from the Console.
OpenAI-Beta· header · 必填Idempotency-Key· header · 可选- Reuse with the original session creation body when recovering an uncertain response.
请求体
必填
application/json
响应
200- Success
400- Invalid or unsupported request
401- Missing, invalid or revoked organization API key.
402- Insufficient funds or execution budget.
403- Product scope, instance, project, workspace or current entitlement denied.
404- Resource not found in this scope
409- State or idempotency conflict
413- Request body exceeds the route limit.
429- Rate or quota limit reached. Respect Retry-After when supplied.
501- Capability not implemented
502- Runtime response unavailable; read durable session state before attempting more execution.
503- Runtime, deployment, model or billing admission unavailable.
504- Gateway deadline exceeded; execution may have started. Inspect durable state before another submission.