Endpoint
Request Body
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messages | array | Yes | - | OpenAI-compatible message array |
model | string | No | "eachsense/beta" | Model identifier |
stream | boolean | No | true | Enable SSE streaming |
session_id | string | No | - | Session ID for conversation continuity |
mode | string | No | "max" | Quality mode: "max" or "eco" |
behavior | string | No | "agent" | "agent", "plan", or "ask" |
image_urls | string[] | No | - | Image URLs for analysis/editing (max 4) |
workflow_id | string | No | - | Target workflow for execution |
version_id | string | No | - | Workflow version |
web_search | boolean | No | true | Enable web search capability |
enable_safety_checker | boolean | No | true | NSFW content filter |
Code Examples
Response (Non-Streaming)
Extended Response Fields
| Field | Type | Description |
|---|---|---|
generations | string[] | URLs of generated media |
task_id | string | Unique task identifier |
session_id | string | Session ID for continuity |
workflow_id | string | Created/used workflow ID |
Response (Streaming)
See Streaming for the full SSE streaming format with 18 event types.Error Responses
| Status | Body | Description |
|---|---|---|
401 | {"detail": "API key is required."} | Missing API key |
401 | {"detail": "Invalid API key."} | Invalid API key |
422 | {"detail": [{"loc": ["body","messages"], "msg": "field required"}]} | Missing messages |
429 | {"detail": "Rate limit exceeded."} | Rate limited |