Build with 4o Image
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/jobs' \
-H 'Authorization: Bearer $SORCERESS_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "4o-image-api",
"input": {
"size": "<size>"
}
}'Inputs & settings
sizestringRequired(Required) Aspect ratio of the generated image. Must be one of the listed values.
Options: 1:1, 3:2, 2:3
promptstring(Optional) Text prompt that conveys the creative idea you want the 4o model to render. Required if neither `files_url` nor `file_url` is supplied. At least one of `prompt` or `files_url` must be provided.
file_urlstring(Optional, Deprecated) File URL, such as an image URL. If file_url is provided, 4o image may create based on this image. This parameter will be deprecated in the future, please use files_url instead.
files_urlarray(Optional) Up to 5 publicly reachable image URLs to serve as reference or source material. Use this when you want to edit or build upon an existing picture. Supported formats:.jfif,.pjpeg,.jpeg,.pjp,.jpg,.png,.webp. At least one of `prompt` or `files_url` must be provided.
Full input schema
{
"type": "object",
"required": [
"size"
],
"properties": {
"size": {
"enum": [
"1:1",
"3:2",
"2:3"
],
"type": "string",
"title": "Size",
"description": "(Required) Aspect ratio of the generated image. Must be one of the listed values."
},
"prompt": {
"type": "string",
"title": "Prompt",
"description": "(Optional) Text prompt that conveys the creative idea you want the 4o model to render. Required if neither `files_url` nor `file_url` is supplied. At least one of `prompt` or `files_url` must be provided."
},
"file_url": {
"type": "string",
"title": "File URL",
"format": "uri",
"x-media": "image",
"description": "(Optional, Deprecated) File URL, such as an image URL. If file_url is provided, 4o image may create based on this image. This parameter will be deprecated in the future, please use files_url instead."
},
"files_url": {
"type": "array",
"items": {
"type": "string",
"format": "uri"
},
"title": "Files URL",
"x-media": "image",
"description": "(Optional) Up to 5 publicly reachable image URLs to serve as reference or source material. Use this when you want to edit or build upon an existing picture. Supported formats:.jfif,.pjpeg,.jpeg,.pjp,.jpg,.png,.webp. At least one of `prompt` or `files_url` must be provided."
}
}
}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.






