xTL 1.0
Long-context text generation, with image input.
A general-purpose text model: send a conversation, get the answer back in the same call. It reads images as well as text, so the shape most callers want is to hand it a picture and ask for something written from it — a description, or a prompt for the video or image model that comes next. The input window takes a whole brief, a transcript or a document, which also makes it the one to reach for when the work is writing rather than generating: rewriting or shortening a brief, summarising, translating, or drafting copy to sit beside an image.
- Reads images: attach one or more by https URL and ask for a description, a caption or a prompt built from what is in them
- Synchronous — the answer is in the response. Nothing to poll, no webhook to register
- Long context: a whole brief, a transcript or a document fits in one call
- Multi-turn: send the turns you want the model to see — the endpoint keeps no state between calls
- Billed per call, not per token: the price is the same whatever the length
The call is synchronous: the answer comes back in the same response, so there is nothing to poll and no webhook to register. Expect 15-25 seconds for a full-length answer and allow up to 90 seconds. Billing is per call rather than per token, and a call that fails is refunded automatically.
Authentication. Add Authorization: Bearer xm_live_… to every request.
Account responsibility. Every request must include the real email of YOUR end-user via endUserEmail. You are accountable for what they generate — monitor activity and act on abuse, or your account may be suspended.
Quick example
Send a generation in 5 lines. Pick your language below.
curl -X POST https://api.xmode.ai/v1/chat/completions \
-H "Authorization: Bearer xm_live_<your-key>" \
-H "Content-Type: application/json" \
-d '{
"endUserEmail": "alice@your-product.com",
"model": "xTL1.0",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://cdn.your-product.com/frames/a1b2c3.jpg"
}
},
{
"type": "text",
"text": "Describe this image in detail."
}
]
}
],
"maxTokens": 600
}'Request parameters
The fields you can include in the request body. Anything not listed is ignored.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
endUserEmail | string | yes | — | Email of YOUR end-user who triggered this call. Calls are grouped under it, exactly as generations are. Example: |
model | "xTL1.0" | yes | — | The model alias. Example: |
messages | Array<{ role, content }> | yes | — | The conversation, in order. `role` is `system`, `user` or `assistant`. This endpoint keeps NO state between calls — send the turns you want the model to see, every time. `content` is either a plain string, or an array of parts — `{ type: "text", text }` and `{ type: "image_url", image_url: { url } }` — when the message carries images. |
maxTokens | number | no | 1,024 | Ceiling on the answer, in tokens. An answer that reaches it comes back with `finishReason: "truncated"`. Example: |
temperature | number | no | — | Higher is more varied. Omit for the model default. Example: |
topP | number | no | — | Nucleus sampling. Omit for the model default. |
stop | string[] | no | — | Up to 4 strings that end the answer when generated. |
Response
The POST answers 202 Accepted with this shape — the job is queued, not finished. Read the result from pollUrl, which returns the same record with the fields below filled in. Output URLs are signed and valid for 23 hours.
{
"requestId": "V1StGXR8_Z5jdHi6",
"model": "xTL1.0",
"text": "Rain has just stopped and the alley still holds it...",
"finishReason": "complete",
"cost": {
"xTokens": 1
},
"createdAt": "2026-09-30T12:04:04.123Z"
}| Name | Type | Required | Default | Description |
|---|---|---|---|---|
requestId | string | yes | — | Unique id of this call. Quote it in any support request. |
model | string | yes | — | The alias that answered. |
text | string | yes | — | The generated answer. |
finishReason | "complete" | "truncated" | "filtered" | yes | — | How it ended. `complete` — the model stopped by itself. `truncated` — it reached `maxTokens`. `filtered` — a content filter stopped it. A fixed set, so it stays the same when the model behind the alias changes. |
cost | { xTokens: number } | yes | — | What this call was charged. The same whatever the length; a failed call is refunded automatically. |
createdAt | string | yes | — | When the call was accepted (ISO 8601). |
Use cases
Common patterns. Copy any block, replace the API key, and you have a runnable request.
Describe an image
Attach the picture by URL and say what you want written from it. The image goes in a content part beside the text; everything else about the call is unchanged.
curl -X POST https://api.xmode.ai/v1/chat/completions \
-H "Authorization: Bearer xm_live_<your-key>" \
-H "Content-Type: application/json" \
-d '{
"endUserEmail": "alice@your-product.com",
"model": "xTL1.0",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://cdn.your-product.com/frames/a1b2c3.jpg"
}
},
{
"type": "text",
"text": "Describe this image in detail."
}
]
}
],
"maxTokens": 600
}'Turn an image into a video prompt
The system message sets the house style, the image is the frame the clip starts from. This is the shape behind an image-to-video flow: the answer goes straight into the video model as its prompt.
curl -X POST https://api.xmode.ai/v1/chat/completions \
-H "Authorization: Bearer xm_live_<your-key>" \
-H "Content-Type: application/json" \
-d '{
"endUserEmail": "alice@your-product.com",
"model": "xTL1.0",
"messages": [
{
"role": "system",
"content": "You write prompts for image-to-video generation. Given a still frame, write one English prompt for a 10-second clip that starts from it. Keep the subject, wardrobe and lighting; describe what MOVES. Output the prompt only."
},
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://cdn.your-product.com/frames/a1b2c3.jpg"
}
},
{
"type": "text",
"text": "warm and intimate, keep the camera moving"
}
]
}
],
"maxTokens": 800
}'Turn an idea into a prompt
The system message sets the behaviour, the user message carries the idea. This is the shape most callers want first.
curl -X POST https://api.xmode.ai/v1/chat/completions \
-H "Authorization: Bearer xm_live_<your-key>" \
-H "Content-Type: application/json" \
-d '{
"endUserEmail": "alice@your-product.com",
"model": "xTL1.0",
"messages": [
{
"role": "system",
"content": "You rewrite a rough idea into one vivid English image prompt of at most 80 words. Output the prompt only."
},
{
"role": "user",
"content": "a woman on a rainy Tokyo street at night"
}
],
"maxTokens": 300
}'Continue a conversation
There is no session. Replay the turns you want kept; anything you leave out, the model never saw.
curl -X POST https://api.xmode.ai/v1/chat/completions \
-H "Authorization: Bearer xm_live_<your-key>" \
-H "Content-Type: application/json" \
-d '{
"endUserEmail": "alice@your-product.com",
"model": "xTL1.0",
"messages": [
{
"role": "user",
"content": "Give me a name for a rainy-night photo series."
},
{
"role": "assistant",
"content": "Wet Neon."
},
{
"role": "user",
"content": "Three more, shorter."
}
]
}'Limits
- Max input: 64,000 bytes of UTF-8 of TEXT, across all messages. Image URLs do not count towards it
- Images per call: Up to 8, each a publicly reachable https URL
- Max answer: 2,000 tokens
- Default answer: 1,024 tokens
- Typical response time: 15-25 seconds for a full-length answer
- Streaming: Not supported
- Completions per call: 1
- Tool calling / structured output: Not supported