Text Generation
Generate text completions and extract brand styles with AI models.
POST
/api/v1/text/generateRequest Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model key (see models below) |
| prompt | string | No | Text prompt (required for openrouter-completion) |
| params | object | No | Model-specific parameters |
| attachmentMediaIds | string[] | No | Positional media attachment IDs |
Response
{
"inferenceJobId": "ij_..."
}Example
POST
/api/v1/text/generate{
"model": "openrouter-completion",
"prompt": "Write a tagline for a sustainable fashion brand",
"params": {
"llm": "anthropic/claude-sonnet-4.6",
"systemPrompt": "You are a creative copywriter specializing in fashion.",
"reasoningEnabled": true,
"reasoningEffort": "medium",
"maxOutputTokens": 4096
}
}Models
openrouter-completion
LLM text completion via OpenRouter. Prompt required.
| Parameter | Type | Required | Description |
|---|---|---|---|
| llm | string | No | openai/gpt-5.2, openai/gpt-5.1, openai/gpt-5-chat, google/gemini-3-pro-preview, google/gemini-3-flash-preview, anthropic/claude-opus-4.5, anthropic/claude-sonnet-4.5, anthropic/claude-sonnet-4.6, x-ai/grok-4, x-ai/grok-4-fast (default x-ai/grok-4-fast) |
| systemPrompt | string | No | System prompt to set the LLM persona and behavior |
| reasoningEnabled | boolean | No | Enable reasoning/chain-of-thought mode |
| reasoningEffort | string | No | minimal, low, medium, high, xhigh |
| reasoningMaxTokens | number | No | 1024 to 32000 |
| maxOutputTokens | number | No | 1024 to 128000 |
Attachments: Up to 4 optional media attachments.
Available LLMs
| Provider | Model |
|---|---|
| OpenAI | openai/gpt-5.2 |
| OpenAI | openai/gpt-5.1 |
| OpenAI | openai/gpt-5-chat |
google/gemini-3-pro-preview | |
google/gemini-3-flash-preview | |
| Anthropic | anthropic/claude-opus-4.5 |
| Anthropic | anthropic/claude-sonnet-4.5 |
| Anthropic | anthropic/claude-sonnet-4.6 |
| xAI | x-ai/grok-4 |
| xAI | x-ai/grok-4-fast |
extract-brand-style
Extract brand style attributes from images. Prompt is hardcoded internally.
Params: None.
Attachments: 1 to 8 brand images (first is required).