Text Generation

Generate text completions and extract brand styles with AI models.


POST/api/v1/text/generate

Request Body

ParameterTypeRequiredDescription
modelstringYesModel key (see models below)
promptstringNoText prompt (required for openrouter-completion)
paramsobjectNoModel-specific parameters
attachmentMediaIdsstring[]NoPositional 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.

ParameterTypeRequiredDescription
llmstringNoopenai/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)
systemPromptstringNoSystem prompt to set the LLM persona and behavior
reasoningEnabledbooleanNoEnable reasoning/chain-of-thought mode
reasoningEffortstringNominimal, low, medium, high, xhigh
reasoningMaxTokensnumberNo1024 to 32000
maxOutputTokensnumberNo1024 to 128000

Attachments: Up to 4 optional media attachments.

Available LLMs

ProviderModel
OpenAIopenai/gpt-5.2
OpenAIopenai/gpt-5.1
OpenAIopenai/gpt-5-chat
Googlegoogle/gemini-3-pro-preview
Googlegoogle/gemini-3-flash-preview
Anthropicanthropic/claude-opus-4.5
Anthropicanthropic/claude-sonnet-4.5
Anthropicanthropic/claude-sonnet-4.6
xAIx-ai/grok-4
xAIx-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).