Skip to content

GET /api/qr/ai/providers

Returns the LLM providers and models the marketplace AI endpoint (POST /api/qr/ai/generate) understands. Useful for client UIs that let the user pick a provider — you don't need to hard-code the matrix; just hit this endpoint and render whatever it returns.

The consumer endpoint (/api/qr/ai/generate/server) does not need this — the server picks the provider for you.

Request

Response

{
  "success": true,
  "count": 10,
  "modelsNote": "Any model ID your provider offers works; this list shows recommended ones.",
  "providers": [
    {
      "id": "openai",
      "name": "OpenAI",
      "defaultModel": "gpt-6-luna",
      "availableModels": ["gpt-6-astra", "gpt-6.1-sol", "gpt-6-luna", "gpt-6-sol", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-4.1-mini"],
      "acceptsAnyModel": true
    },
    {
      "id": "anthropic",
      "name": "Anthropic",
      "defaultModel": "claude-sonnet-5-5",
      "availableModels": ["claude-fable-5-1", "claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-4-5"],
      "acceptsAnyModel": true
    },
    {
      "id": "google",
      "name": "Google Gemini",
      "defaultModel": "gemini-3.8-flash",
      "availableModels": ["gemini-3.1-pro-preview", "gemini-3.8-flash", "gemini-3.5-flash-lite", "gemini-3.5-flash"],
      "acceptsAnyModel": true
    },
    {
      "id": "mistral",
      "name": "Mistral AI",
      "defaultModel": "mistral-medium-latest",
      "availableModels": ["mistral-large-latest", "mistral-medium-latest", "mistral-small-latest"],
      "acceptsAnyModel": true
    },
    {
      "id": "cohere",
      "name": "Cohere",
      "defaultModel": "command-a-03-2025",
      "availableModels": ["command-a-plus-05-2026", "command-a-03-2025", "command-a-reasoning-08-2025", "command-r7b-12-2024"],
      "acceptsAnyModel": true
    },
    {
      "id": "groq",
      "name": "Groq",
      "defaultModel": "openai/gpt-oss-120b",
      "availableModels": ["openai/gpt-oss-120b", "openai/gpt-oss-20b", "llama-3.3-70b-versatile"],
      "acceptsAnyModel": true
    },
    {
      "id": "xai",
      "name": "xAI Grok",
      "defaultModel": "grok-4.3",
      "availableModels": ["grok-4.7", "grok-4.3", "grok-4.20-0309-non-reasoning"],
      "acceptsAnyModel": true
    },
    {
      "id": "deepseek",
      "name": "DeepSeek",
      "defaultModel": "deepseek-flash",
      "availableModels": ["deepseek-v4-pro", "deepseek-flash"],
      "acceptsAnyModel": true
    },
    {
      "id": "qwen",
      "name": "Alibaba Qwen",
      "defaultModel": "qwen3.8-flash",
      "availableModels": ["qwen3.8-max", "qwen3.7-plus", "qwen3.8-flash"],
      "acceptsAnyModel": true
    },
    {
      "id": "local",
      "name": "Local (Ollama / LM Studio)",
      "defaultModel": "",
      "availableModels": [],
      "acceptsAnyModel": true
    }
  ]
}

Picking a model

If you don't pass llmModel, the engine uses the provider's default model below. Pass llmModel: "<id>" on the generation call to choose another one.

Any model ID your provider offers works; this list shows recommended ones.

ProviderDefault model
OpenAIgpt-6-luna
Anthropicclaude-sonnet-5-5
Googlegemini-3.8-flash
Mistralmistral-medium-latest
Coherecommand-a-03-2025
Groqopenai/gpt-oss-120b
xAIgrok-4.3
DeepSeekdeepseek-flash
Qwenqwen3.8-flash
Local ("local")the model your endpoint serves

You pay your provider directly for the tokens each generation uses, at its current prices; we add no markup. Check each provider's pricing page for the exact cost.

Errors

CodeMeaning
INVALID_LLM_PROVIDERllmProvider is not one of the ids above.
INVALID_LLM_MODELllmModel is not a well-formed model ID (letters, digits, . _ : / -, up to 100 characters).
LLM_API_KEY_INVALIDThe provider rejected the key you passed.

See Errors for the full code matrix.