Send an image (with optional caption) to the assistant
const url = 'http://localhost:11044/api/v1/chat/image';const form = new FormData();form.append('image', 'file');
const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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=@fileUploads 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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>]
Request Body
Section titled “Request Body”object
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
Responses
Section titled “Responses”Image accepted
object
Invalid image
A refusal from the chat surface: the word error and the reason, written to be shown
object
What was refused and why, such as no open stream, no active session, or an unknown command
Always error. A client may branch on it rather than on the status code
Example
errorNo active SSE stream — open /stream first
A refusal from the chat surface: the word error and the reason, written to be shown
object
What was refused and why, such as no open stream, no active session, or an unknown command
Always error. A client may branch on it rather than on the status code
Example
error
