Build with Claude Sonnet 5
Make your first request
Use your Sorceress API key on your server. The playground uses your signed-in account; your application uses the same model with an API key.
curl -X POST 'https://sorceress.games/api/v1/chat/completions' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"messages": [
{
"role": "user",
"content": "Hello! What can you help me create?"
}
],
"max_tokens": 1024,
"model": "claude-sonnet-5"
}'Inputs & settings
messagesarrayRequiredmax_tokensintegertemperaturenumberFull input schema
{
"type": "object",
"required": [
"model",
"messages"
],
"properties": {
"model": {
"type": "string",
"title": "Model",
"enum": [
"claude-sonnet-5"
],
"default": "claude-sonnet-5"
},
"messages": {
"type": "array",
"title": "Messages",
"description": "The conversation so far, oldest first. Content is a string or text / image_url parts. Video files use image_url only on models whose chat_capabilities.video_input is true.",
"minItems": 1,
"items": {
"type": "object",
"required": [
"role"
],
"properties": {
"role": {
"type": "string",
"title": "Role",
"enum": [
"system",
"developer",
"user",
"assistant",
"tool"
]
},
"content": {
"title": "Content",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text",
"image_url"
]
},
"text": {
"type": "string"
},
"image_url": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"detail": {
"type": "string",
"enum": [
"auto",
"low",
"high"
]
},
"mime_type": {
"type": "string",
"description": "Optional image or video MIME type for a hosted reference."
}
}
}
}
}
}
]
},
"name": {
"type": "string",
"title": "Name"
},
"tool_calls": {
"type": "array",
"title": "Tool calls",
"items": {
"type": "object"
}
},
"tool_call_id": {
"type": "string",
"title": "Tool call ID"
}
}
}
},
"tools": {
"type": "array",
"title": "Tools",
"description": "Function tools the model may call: { type: \"function\", function: { name, description, parameters } }.",
"items": {
"type": "object"
}
},
"tool_choice": {
"title": "Tool choice",
"description": "\"auto\", \"none\", \"required\" or { type: \"function\", function: { name } }.",
"oneOf": [
{
"type": "string",
"enum": [
"auto",
"none",
"required"
]
},
{
"type": "object"
}
]
},
"stream": {
"type": "boolean",
"title": "Stream",
"description": "Server-sent events; the final chunk carries usage and the credits charged.",
"default": false
},
"max_tokens": {
"type": "integer",
"title": "Max tokens",
"description": "Upper bound on the number of tokens generated for the reply (reasoning tokens included).",
"minimum": 1,
"maximum": 128000,
"default": 4096
},
"temperature": {
"type": "number",
"title": "Temperature",
"minimum": 0,
"maximum": 2
},
"top_p": {
"type": "number",
"title": "Top p",
"minimum": 0,
"maximum": 1
},
"stop": {
"title": "Stop",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"maxItems": 4
}
]
},
"response_format": {
"type": "object",
"title": "Response format",
"description": "{ type: \"text\" | \"json_object\" }",
"properties": {
"type": {
"type": "string",
"enum": [
"text",
"json_object"
]
}
}
},
"reasoning_effort": {
"type": "string",
"title": "Reasoning",
"enum": [
"none",
"enabled"
],
"description": "Choose a supported reasoning setting. Omit to use the model default."
}
}
}Results, saved runs & billing
Media requests return a job ID. Poll GET /api/v1/jobs/:id until it succeeds or fails; keep the same ID while it is processing. Long chat requests can also return a saved job to poll. Completed outputs are stored in your account, and successful work is billed using your model's current rates.
A multi-step workflow may include separately billed successful actions. If a connection drops, check your saved run before submitting it again.






