Create an agent run
Start a Spyglass agent run. The run id is the chat thread id.
Pass outputSchema to get that JSON on structured when the run completes.
The root type must be "object". Each property can be a string, number, integer, boolean, array, or object.
model is default or pro.
Poll GET /agent/runs/{id} until status is completed or failed.
Limited to 20 requests per minute per user. The create call is free. The run is billed from model usage when it finishes.
Authentication
AuthorizationBearer
An API key from Settings → API, prefixed sg_live_.
Request
This endpoint expects an object.
query
outputSchema
JSON Schema for structured. The root type must be "object". Each property can be a string, number, integer, boolean, array, or object.
systemPrompt
effort
model
Allowed values:
Response
The queued run.
id
status
Allowed values:
createdAt
Errors
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
405
Method Not Allowed Error
429
Too Many Requests Error
500
Internal Server Error