Spark
For a caption, an image alt line, or a short client brief when you already hold the facts. Start with Getting started. Pricing for a key is on pricing. The free deterministic line is caption. Vibe labels stay on vibe, which is a different model and a different job.
POST /v1/spark needs an API key. It is not on the free demo. It does not browse the web. It does not fetch a URL. It is not an MCP tool.
Send JSON:
{ "task": "caption", "facts": "Market day in the square", "tone": "people" }
task is caption, alt, or brief. tone is optional: people, maker, or client. facts is 1 to 2000 characters. Extra keys are refused, so you cannot pass a model name or a system prompt.
The draft may only use numbers that already appear in facts. If it adds a number, the answer is dropped, available is false, and the draft is not returned. Check the line before you publish. This host does not store a chat.
If XAI_API_KEY is not set, the route returns 503. It does not invent a sentence.
Parameters
| Name | Required | Notes |
|---|---|---|
| task | yes | caption, alt, or brief |
| facts | yes | The only source |
| tone | no | people, maker, or client |