Skip to content

Send an image (with optional caption) to the assistant

POST
/api/v1/chat/image
curl --request POST \
--url http://localhost:11044/api/v1/chat/image \
--header 'Content-Type: multipart/form-data' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--form image=@file

Uploads an image and optional caption text. The image is persisted to the world and sent to the assistant as a multimodal message. The response is delivered via the SSE stream.

caption
string

Text sent with the image as the user’s words about it, and shown as their turn on every open stream. Omitted, the image goes to the assistant alone and the turn is shown as [image: <filename>]

Media typemultipart/form-data
object
image
required

The image, as a multipart file part. The part’s content type is the image format, image/jpeg when it carries none, and must be one the model accepts; an empty, unsupported or over-20 MB (20971520 bytes) image is refused with 400. The part’s filename is kept in the name it is saved under in the world, image.jpg when absent

string format: binary

Image accepted

Media type*/*
object
key
additional properties
string

Invalid image

Media type*/*

A refusal from the chat surface: the word error and the reason, written to be shown

object
message
required

What was refused and why, such as no open stream, no active session, or an unknown command

string
status
required

Always error. A client may branch on it rather than on the status code

string

Example

error

No active SSE stream — open /stream first

Media type*/*

A refusal from the chat surface: the word error and the reason, written to be shown

object
message
required

What was refused and why, such as no open stream, no active session, or an unknown command

string
status
required

Always error. A client may branch on it rather than on the status code

string

Example

error