# Get Started Source: https://docs.linkmodel.ai/agent-integrations Configure LinkModel chat models in DeepSeek Harness, OpenCode, Claude Code, and Codex. Use LinkModel as the model provider behind coding agents that can call OpenAI-compatible, Anthropic-compatible, or Responses-compatible chat endpoints. ## Guides Configure LinkModel as an OpenAI-compatible provider in OpenCode. Route Claude Code Anthropic-format requests through LinkModel. Configure Codex to call GPT-series LinkModel models with the Responses API wire protocol. Add LinkModel as a custom OpenAI-compatible provider in DeepSeek Harness. Diagnose auth, model selection, endpoint, and tool-calling issues. ## Endpoint Selection | Agent | Recommended endpoint | Model guidance | | ---------------- | ------------------------ | -------------------------------------------------------------------------------------------------------- | | OpenCode | `POST /chat/completions` | Use any LinkModel chat model exposed on the [Models](/models) page. | | Claude Code | `POST /messages` | Prefer Anthropic-family models first, then test other chat models for tool compatibility. | | Codex | `POST /responses` | Use GPT-series models only, such as `gpt-5.3-codex`, `gpt-5.6-sol`, or `gpt-5`. | | DeepSeek Harness | `POST /chat/completions` | Start with `deepseek-v4-pro` or `deepseek-v4-flash`, then test other chat models for tool compatibility. | ## Base URL All agent integrations use this base URL: ```text theme={null} https://api.linkmodel.ai/v1 ``` Set the model to one of the supported chat model names from [Models](/models). Coding agents send tool/function-calling fields so they can edit files, run shell commands, and continue multi-step work. If a request fails because of unsupported tool fields, switch to a different model or use the endpoint most closely matching the agent's native protocol. ## Related API References * [OpenAI-compatible Chat Completions](/api-reference/chat/openai-chat-completions) * [Anthropic-compatible Messages](/api-reference/chat/anthropic-messages) * [OpenAI-compatible Responses](/api-reference/chat/openai-responses) # Claude Code Source: https://docs.linkmodel.ai/agent-integrations-claude-code Configure Claude Code to route Anthropic-compatible Messages requests through LinkModel. Claude Code can route Anthropic-format requests through a custom base URL. ## Configure Set your LinkModel key and Claude Code endpoint variables before launching `claude`: ```bash theme={null} export LINKMODEL_API_KEY="" export ANTHROPIC_BASE_URL="https://api.linkmodel.ai/v1" export ANTHROPIC_AUTH_TOKEN="$LINKMODEL_API_KEY" export ANTHROPIC_MODEL="claude-opus-4-7" claude ``` Use a model available on the [Messages endpoint](/api-reference/chat/anthropic-messages). Anthropic-family models are the safest first choice for Claude Code because the request format is Anthropic-native. ## Custom Model Picker If your Claude Code version supports custom model picker entries, expose a LinkModel model with: ```bash theme={null} export ANTHROPIC_CUSTOM_MODEL_OPTION="claude-opus-4-7" export ANTHROPIC_CUSTOM_MODEL_OPTION_NAME="Claude Opus 4.7 via LinkModel" export ANTHROPIC_CUSTOM_MODEL_OPTION_DESCRIPTION="LinkModel Anthropic-compatible Messages endpoint" ``` Then open Claude Code and choose the custom model entry. ## Notes * `ANTHROPIC_AUTH_TOKEN` is sent as the bearer token value. * `ANTHROPIC_BASE_URL` changes where Claude Code sends Anthropic API requests. * If a selected model fails on tool-use fields, switch models or remove the custom endpoint. ## Official Reference * [Claude Code environment variables](https://code.claude.com/docs/en/env-vars) * [Claude Code authentication](https://code.claude.com/docs/en/team) # Codex Source: https://docs.linkmodel.ai/agent-integrations-codex Configure Codex to call GPT-series LinkModel chat models with the Responses API wire protocol. Codex should use LinkModel's Responses-compatible endpoint. Use GPT-series LinkModel models only. ## Configure Set your LinkModel API key: ```bash theme={null} export LINKMODEL_API_KEY="" ``` Add a LinkModel provider to `~/.codex/config.toml`: ```toml theme={null} model = "gpt-5.3-codex" model_provider = "linkmodel" [model_providers.linkmodel] name = "LinkModel" base_url = "https://api.linkmodel.ai/v1" env_key = "LINKMODEL_API_KEY" wire_api = "responses" ``` Start Codex: ```bash theme={null} codex ``` ## Recommended Models Use GPT-series models that are exposed on the [Responses endpoint](/api-reference/chat/openai-responses): | Model | Use case | | --------------- | ----------------------------------------- | | `gpt-5.3-codex` | Agentic coding and Codex workflows. | | `gpt-5.6-sol` | GPT reasoning and coding workflows. | | `gpt-5` | General GPT chat and reasoning workflows. | ## Verify Open `/status` in Codex and confirm the active provider is `linkmodel`. If Codex does not pick up shell environment variables, put the key in `~/.codex/.env`: ```text theme={null} LINKMODEL_API_KEY= ``` Restart Codex after changing `~/.codex/config.toml` or `~/.codex/.env`. ## Official Reference * [OpenAI Codex repository](https://github.com/openai/codex) * [Codex model provider source](https://github.com/openai/codex/blob/main/codex-rs/model-provider-info/src/lib.rs) # DeepSeek Harness Source: https://docs.linkmodel.ai/agent-integrations-deepseek-harness Configure DeepSeek Harness to use LinkModel chat models through a custom OpenAI-compatible provider. DeepSeek Harness (`dsh`) can connect to LinkModel through its custom provider flow. Use the OpenAI-compatible Chat Completions protocol and add the LinkModel model IDs you want to expose in the model picker. DeepSeek Harness is currently a developer preview. Its configuration and UI may change between releases. ## Start DeepSeek Harness Install Node.js, then launch the Web UI: ```bash theme={null} npx @deepseek-ai/dsh web ``` The Web UI is served at `http://127.0.0.1:3080` by default. ## Configure in the Web UI Open **Settings → Models**, choose **Add a custom provider**, and enter: | Field | Value | | ------------ | ----------------------------- | | Provider ID | `linkmodel` | | Display name | `LinkModel` | | Base URL | `https://api.linkmodel.ai/v1` | | API protocol | `openai-completions` | | Credential | Your LinkModel API key | | Model | `deepseek-v4-pro` | Add other model IDs from the [Models](/models) page as needed, then save the provider. Select `linkmodel/deepseek-v4-pro` from the model picker before starting a new session. DeepSeek Harness can query an OpenAI-compatible `GET /models` endpoint through **Fetch available models**. If discovery is unavailable, enter the model IDs manually. ## Configure with settings.yaml For an environment-variable-based setup, export your LinkModel API key: ```bash theme={null} export LINKMODEL_API_KEY="" ``` Add the provider to `$DSH_HOME/settings.yaml`: ```yaml theme={null} llm-pi-ai: providers: linkmodel: apiKeyEnv: LINKMODEL_API_KEY api: openai-completions baseURL: https://api.linkmodel.ai/v1 models: - id: deepseek-v4-pro - id: claude-opus-4-8 - id: gpt-5.6-sol - id: gemini-3.5-flash - id: glm-5.1 - id: kimi-k3 - id: minimax-m2.7 ``` The example keeps one current model from each supported chat provider family. Restart DeepSeek Harness after editing the file, then select a `linkmodel/*` model in the model picker. See [Models](/models) for additional variants. ## Notes * Keep API keys in the Harness credential store or environment variables. Do not commit them to a repository. * Custom models are treated as text-only unless their input modalities are explicitly configured. * Use `POST /chat/completions` models. Responses-only provider configurations are not used by this integration. * Start a new session after changing the selected provider or model because existing sessions retain their recorded model. ## Official references * [DeepSeek Harness repository](https://github.com/deepseek-ai/deepseek-harness/tree/master) * [DeepSeek Harness Web UI guide](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/guide/index.md) * [DeepSeek Harness model configuration](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/guide/providers.md) # OpenCode Source: https://docs.linkmodel.ai/agent-integrations-opencode Configure OpenCode to use LinkModel chat models through an OpenAI-compatible provider. OpenCode can use custom OpenAI-compatible providers. Configure LinkModel with the `/v1` base URL and explicit model entries. OpenCode v2 uses the `providers` object, `package`, and `settings.baseURL`. Older OpenCode examples may use `provider`, `npm`, and `options.baseURL`. ## Configure Set your API key: ```bash theme={null} export LINKMODEL_API_KEY="" ``` Create or update `opencode.json` in your project: ```json theme={null} { "$schema": "https://opencode.ai/config.json", "model": "linkmodel/gpt-5.3-codex", "providers": { "linkmodel": { "name": "LinkModel", "env": ["LINKMODEL_API_KEY"], "package": "@opencode-ai/ai/providers/openai-compatible", "settings": { "baseURL": "https://api.linkmodel.ai/v1" }, "models": { "gpt-5.3-codex": { "name": "GPT-5.3 Codex", "modelID": "gpt-5.3-codex", "capabilities": { "tools": true, "input": ["text"], "output": ["text"] } }, "claude-opus-4-7": { "name": "Claude Opus 4.7", "modelID": "claude-opus-4-7", "capabilities": { "tools": true, "input": ["text"], "output": ["text"] } }, "deepseek-v4-pro": { "name": "DeepSeek V4 Pro", "modelID": "deepseek-v4-pro", "capabilities": { "tools": true, "input": ["text"], "output": ["text"] } } } } } } ``` Start OpenCode: ```bash theme={null} opencode ``` Use `/models` and select a `linkmodel/*` model. ## Notes * Keep API keys in environment variables. Do not commit them in `opencode.json`. * Add more models from [Models](/models) as needed. * If your OpenCode version expects the older config shape, use the official OpenCode provider docs linked below. ## Official Reference * [OpenCode Providers](https://opencode.ai/v2/docs/providers) * [OpenCode Config](https://opencode.ai/v2/docs/config) # Troubleshooting Source: https://docs.linkmodel.ai/agent-integrations-troubleshooting Resolve common LinkModel agent integration issues for DeepSeek Harness, OpenCode, Claude Code, and Codex. ## Which Endpoint Should I Use? | Client behavior | Use | | ----------------------------------------- | ---------------------------------------------- | | OpenAI Chat Completions-compatible client | `https://api.linkmodel.ai/v1/chat/completions` | | Anthropic Messages-compatible client | `https://api.linkmodel.ai/v1/messages` | | Codex or Responses API client | `https://api.linkmodel.ai/v1/responses` | Use the base URL `https://api.linkmodel.ai/v1` when the agent appends endpoint paths automatically. ## Authentication Fails Check that the agent can read your environment variable: ```bash theme={null} echo "$LINKMODEL_API_KEY" ``` For Codex desktop apps or editor extensions, put the key in `~/.codex/.env` and restart the app: ```text theme={null} LINKMODEL_API_KEY= ``` For Claude Code, use `ANTHROPIC_AUTH_TOKEN` with the LinkModel key: ```bash theme={null} export ANTHROPIC_AUTH_TOKEN="$LINKMODEL_API_KEY" ``` ## Model Not Found Check the current model list: ```text theme={null} https://docs.linkmodel.ai/models ``` Then use the exact model ID in the agent configuration. ## Tool Calling Fails Coding agents often send tool/function-calling fields. If the model rejects the request: * Use the endpoint matching the agent's native protocol. * Try a coding-oriented model such as `gpt-5.3-codex`, `gpt-5.6-sol`, `claude-opus-4-7`, or `deepseek-v4-pro`. * Test with a smaller prompt before running a large coding task. ## Codex Uses The Wrong Provider Check `~/.codex/config.toml`: ```toml theme={null} model_provider = "linkmodel" ``` Then open `/status` in Codex and confirm the active provider. ## Related * [Models](/models) * [OpenAI-compatible Chat Completions](/api-reference/chat/openai-chat-completions) * [Anthropic-compatible Messages](/api-reference/chat/anthropic-messages) * [OpenAI-compatible Responses](/api-reference/chat/openai-responses) # happyhorse-1.0 Source: https://docs.linkmodel.ai/api-reference/alibaba/happyhorse-10 /openapi/video/happyhorse-1-0.yaml post /video-generation Alibaba ATH Innovation Unit's 15B video model — the first with native joint audio-video generation including dialogue, ambient sound, and lip-sync — #1 on the Artificial Analysis Video Arena, built for short-form, ads, and dialogue-driven video. | | | | --- | --- | | **Provider** | Alibaba | | **Tasks** | text-to-video · image-to-video | | **Starting from** | 0.115800 USD / second · Pricing details | # wan2.6 Source: https://docs.linkmodel.ai/api-reference/alibaba/wan26 /openapi/video/wan2-6.yaml post /video-generation Alibaba's multimodal video generation model series supporting role-play (reference-to-video), multi-shot narrative, audio-visual sync, and up to 15-second output, enabling creators to star in AI videos with their own appearance and voice. | | | | --- | --- | | **Provider** | Alibaba | | **Tasks** | text-to-video · image-to-video | | **Starting from** | 0.304900 USD / call · Pricing details | # seedance-2-0 Source: https://docs.linkmodel.ai/api-reference/bytedance/seedance-2-0 /openapi/video/seedance-2-0.yaml post /video-generation Seedance 2.0 is a multimodal controllable video generation model developed by ByteDance’s Seed Team. Launched in early February 2026, it is now integrated into Doubao, Jimeng AI, and Volcano Engine (Model ID: doubao-seedance-2-0-260128), with an accelerated version—Seedance 2.0 Fast—available for low-latency scenarios. | | | | --- | --- | | **Provider** | Bytedance | | **Tasks** | text-to-video · image-to-video | | **Starting from** | 3.87 USD / token · Pricing details | # seedance-2-5 Source: https://docs.linkmodel.ai/api-reference/bytedance/seedance-2-5 /openapi/video/seedance-2-5.yaml post /video-generation ByteDance’s production-oriented multimodal video model for generating and editing coherent clips up to 30 seconds, with synchronized audio, timestamp-level control, and up to 30 image, 10 video, and 10 audio references f # seedance-v1.5-pro Source: https://docs.linkmodel.ai/api-reference/bytedance/seedance-v15-pro /openapi/video/seedance-v1-5-pro.yaml post /video-generation ByteDance's native audio-visual joint generation model built on a dual-branch DiT architecture, producing synchronized video and audio in a single pass with multilingual lip-sync, cinematic camera control, and narrative coherence. | | | | --- | --- | | **Provider** | Bytedance | | **Tasks** | text-to-video · image-to-video | | **Starting from** | 0.0552 USD / call · Pricing details | # seedream-4.0 Source: https://docs.linkmodel.ai/api-reference/bytedance/seedream-40 /openapi/image/seedream-4-0.yaml post /image-generation ByteDance's multimodal image creation engine unifying text-to-image generation and editing in one architecture, supporting up to 4K output, 30+ art style switching, and multi-reference batch generation with 10x faster inference. | | | | --- | --- | | **Provider** | Bytedance | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.023200 USD / images · Pricing details | # seedream-4.5 Source: https://docs.linkmodel.ai/api-reference/bytedance/seedream-45 /openapi/image/seedream-4-5.yaml post /image-generation ByteDance's unified image generation and editing model with precise text rendering, native 4K resolution, and multi-image reference editing, supporting professional typography, material fidelity, and brand visual consistency for commercial design. | | | | --- | --- | | **Provider** | Bytedance | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.029000 USD / images · Pricing details | # seedream-5.0-lite Source: https://docs.linkmodel.ai/api-reference/bytedance/seedream-50-lite /openapi/image/seedream-5-0-lite.yaml post /image-generation ByteDance's intelligent image model with Chain of Thought visual reasoning and real-time web search, comprehensively upgraded in understanding, reasoning, and generation, supporting up to 4K output and 14-image reference editing. | | | | --- | --- | | **Provider** | Bytedance | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.030300 USD / images · Pricing details | # seedream-5.0-pro Source: https://docs.linkmodel.ai/api-reference/bytedance/seedream-50-pro /openapi/image/seedream-5-0-pro.yaml post /image-generation A professional image generation and editing model from ByteDance, built for strong prompt following, text rendering, multi-image reference, and high-fidelity visual detail across commercial design and creative production. | | | | --- | --- | | **Provider** | Bytedance | | **Tasks** | image-to-image · text-to-image | | **Starting from** | 0.300000 USD / call · Pricing details | # Anthropic Messages Source: https://docs.linkmodel.ai/api-reference/chat/anthropic-messages /openapi/chat/_anthropic-messages.yaml post /messages Use this endpoint when your client expects Anthropic's Messages request and response shape, such as Claude-compatible SDKs or tools configured with a custom Anthropic base URL. The request body, supported `model` values, streaming flag, top-level `system` field, and optional tool fields are defined in the schema below. Official protocol reference: [Anthropic Messages API](https://platform.claude.com/docs/en/api/messages/create). # OpenAI Chat Completions Source: https://docs.linkmodel.ai/api-reference/chat/openai-chat-completions /openapi/chat/_openai-chat-completions.yaml post /chat/completions Use this endpoint when your client expects OpenAI's Chat Completions request and response shape, such as OpenAI-compatible SDKs configured with a custom base URL. The request body, supported `model` values, streaming flag, token limits, tools, and structured-output fields are defined in the schema below. Official protocol reference: [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat/create). # OpenAI Responses Source: https://docs.linkmodel.ai/api-reference/chat/openai-responses /openapi/chat/_openai-responses.yaml post /responses Use this endpoint when your client requires OpenAI's Responses API wire protocol, such as Codex with `wire_api = "responses"`. This endpoint is intended for GPT-series LinkModel chat models. The request body, supported `model` values, streaming flag, and optional tool fields are defined in the schema below. Official protocol reference: [OpenAI Responses API](https://platform.openai.com/docs/api-reference/responses/create). # gemini-2.5-flash-image Source: https://docs.linkmodel.ai/api-reference/google/gemini-25-flash-image /openapi/image/gemini-2-5-flash-image.yaml post /image-generation Generate and edit images with Gemini 2.5 Flash Image through LinkModel's unified image generation API. # gemini-3-pro-image-preview Source: https://docs.linkmodel.ai/api-reference/google/gemini-3-pro-image-preview /openapi/image/gemini-3-pro-image-preview.yaml post /image-generation Google's flagship image generation and editing model built on Gemini 3 Pro, featuring up to 4K resolution, precise multilingual text rendering, real-time Google Search grounding, and studio-quality creative controls. | | | | --- | --- | | **Provider** | Google | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.100500 USD / call · Pricing details | # gemini-3.1-flash-image-preview Source: https://docs.linkmodel.ai/api-reference/google/gemini-31-flash-image-preview /openapi/image/gemini-3-1-flash-image-preview.yaml post /image-generation Nano Banana (gemini-3.1-flash-image-preview) is a highly multifunctional generative model designed for speed, accuracy, and creative flexibility. It excels at transforming text prompts into stunning visual effects while providing advanced composition and style transfer capabilities. | | | | --- | --- | | **Provider** | Google | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.033750 USD / call · Pricing details | # gemini-3.1-flash-lite-image Source: https://docs.linkmodel.ai/api-reference/google/gemini-31-flash-lite-image /openapi/image/gemini-3-1-flash-lite-image.yaml post /image-generation Google's efficiency-tier image model for ultra-low latency and low cost, supporting text-to-image, interleaved generation-editing, and multi-turn local edits with SynthID+C2PA watermarks; ideal for high-volume interactive apps and prototyping. | | | | --- | --- | | **Provider** | Google | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.25 USD / token · Pricing details | # Query image task Source: https://docs.linkmodel.ai/api-reference/image/query-image-task /openapi/image/_query.yaml get /query/image-generation Poll the status and result of an image generation task created via `POST /v1/image-generation`. Call this endpoint periodically with the `task_id` returned from task creation. When `status` is `Success`, `output_images` contains the generated image URLs. **Note:** this endpoint's envelope uses `message`, not `msg` as the create task endpoint does. Plan both field names when parsing. ### Recommended polling schedule Image generation averages ~1 minute (some as fast as 10s). Use this schedule to balance responsiveness and request cost: | Phase | Elapsed | Interval | | --- | --- | --- | | Initial wait | 0 – 10s | — (no requests) | | Dense | 10s – 1 min | every 3s | | Medium | 1 – 3 min | every 6s | | Slow | 3 – 15 min | every 10s | | Timeout | > 15 min | stop, report error | Stop polling when `status` is `Success`, `Failed`, or `Cancelled`. # kling-v3 Source: https://docs.linkmodel.ai/api-reference/kling/kling-v3 /openapi/video/kling-v3.yaml post /video-generation Generate videos with Kling v3 through LinkModel's unified video generation API, supporting text-to-video and image-to-video workflows. # MiniMax-Hailuo-02 Source: https://docs.linkmodel.ai/api-reference/minimax/minimax-hailuo-02 /openapi/video/minimax-hailuo-02.yaml post /video-generation MiniMax's cinematic AI video generation model built on its proprietary NCR architecture with 2.5x efficiency gains, supporting native 1080p output, extreme physics simulation, and precise instruction following, ranked among the top global video models. | | | | --- | --- | | **Provider** | MiniMax | | **Tasks** | image-to-video · text-to-video | | **Starting from** | 0.080000 USD / call · Pricing details | # MiniMax-Hailuo-2.3 Source: https://docs.linkmodel.ai/api-reference/minimax/minimax-hailuo-23 /openapi/video/minimax-hailuo-2-3.yaml post /video-generation MiniMax's upgraded video model built on Hailuo 02, enhancing complex body motion, facial micro-expressions, and physical realism, with expanded style support including anime, ink wash, and game CG — better quality at the same price. | | | | --- | --- | | **Provider** | MiniMax | | **Tasks** | image-to-video · text-to-video | | **Starting from** | 0.224000 USD / call · Pricing details | # gpt-image-2 Source: https://docs.linkmodel.ai/api-reference/openai/gpt-image-2 /openapi/image/gpt-image-2.yaml post /image-generation OpenAI's latest image generation and editing model with a reasoning thinking mode achieving 99%+ text rendering accuracy, supporting up to 2K resolution, flexible aspect ratios, and multilingual text, deeply integrated into ChatGPT and API. | | | | --- | --- | | **Provider** | OpenAI | | **Tasks** | text-to-image · image-to-image | | **Starting from** | 0.9375 USD / token · Pricing details | # sora-2 Source: https://docs.linkmodel.ai/api-reference/openai/sora-2 /openapi/video/sora-2.yaml post /video-generation Generate videos with OpenAI Sora 2 through LinkModel's unified video generation API, including text-to-video and image-to-video requests. # Query video task Source: https://docs.linkmodel.ai/api-reference/video/query-video-task /openapi/video/_query.yaml get /query/video-generation Poll the status and result of a video generation task created via `POST /v1/video-generation`. Call this endpoint periodically with the `task_id` returned from task creation. When `status` is `Success`, `file_url` contains the generated video URL. **Note:** this endpoint's envelope uses `message`, not `msg` as the create task endpoint does. Plan both field names when parsing. ### Recommended polling schedule Video generation averages 2+ minutes. Use this schedule to balance responsiveness and request cost: | Phase | Elapsed | Interval | | --- | --- | --- | | Initial wait | 0 – 30s | — (no requests) | | Medium | 30s – 2 min | every 5s | | Dense | 2 – 4 min | every 3s (peak) | | Slow | 4 – 8 min | every 8s | | Idle | 8 – 15 min | every 15s | | Timeout | > 15 min | stop, report error | Stop polling when `status` is `Success`, `Failed`, or `Cancelled`. # Changelog Source: https://docs.linkmodel.ai/changelog API updates, new models, pricing changes, and breaking changes. ## New model * **[seedance-2-5](/api-reference/bytedance/seedance-2-5)** — ByteDance's Seedance 2.5 supports text-to-video and image-to-video generation up to 30 seconds, synchronized audio, and image, video, or audio references through the unified video generation API. Starting from **6.08 USD / token**. ## Seedance 2.0 parameter update * **[seedance-2-0](/api-reference/bytedance/seedance-2-0)** — `prompt` now accepts up to 5,000 characters. * `duration` now supports 14s and 15s generations. * `resolution` now includes `1080P` and `4K` options. * `prompt` is no longer marked as required, matching image-to-video and media-conditioned workflows. ## Schema upgrade — richer model parameter docs Model parameter schemas now come from a more structured upstream source. As a result, every image / video endpoint now ships with: * **Enum dropdowns** for `size`, `resolution`, `quality` — Playground renders select boxes instead of free-text inputs. * **Default values** shown next to each field (e.g. `seedance-2-0.resolution` defaults to `720P`). * **Conditional rules** spelled out where they apply — e.g. on [minimax-hailuo-02](/api-reference/minimax/minimax-hailuo-02) the `resolution` field now documents the three rules that constrain it (duration, first\_frame\_image, last\_frame\_image). * **Field ordering** reflects how parameters are typically filled in, not alphabetical. * **[gpt-image-2](/api-reference/openai/gpt-image-2)** — previously missing the required `model` field in the schema; now present. ## Chat endpoints — removed unsupported params `temperature`, `top_p`, and `top_k` have been removed from both [`/chat/completions`](/api-reference/chat/openai-chat-completions) and [`/messages`](/api-reference/chat/anthropic-messages). Claude 4.x rejects these parameters with HTTP 400 — documenting them was misleading. The final accepted parameter sets: * **OpenAI Chat Completions**: `model`, `messages`, `stream`, `max_tokens`, `stop` * **Anthropic Messages**: `model`, `messages`, `max_tokens`, `system`, `stream`, `stop_sequences` ## Docs site refresh Visual overhaul to match standard dev-docs density — switched to Mintlify's `maple` theme (three-column layout with persistent code panel on endpoint pages), DM Sans typography, tighter body and sidebar sizing. ## Pricing updates * **[kling-v3](/api-reference/kling/kling-v3)** — starting price drops from **0.0740 → 0.0610 USD / second** (\~17.6% lower). * **[gemini-3.1-flash-image-preview](/api-reference/google/gemini-3-1-flash-image-preview)** — starting price adjusted to **0.0503 USD / call** (was 0.0500). * **[gpt-image-2](/api-reference/openai/gpt-image-2)** — starting price now listed: **0.9375 USD / token**. * **[seedance-2-0](/api-reference/bytedance/seedance-2-0)** — starting price now listed: **3.87 USD / token**. ## New model * **[happyhorse-1.0](/api-reference/alibaba/happyhorse-1-0)** — Alibaba's HappyHorse 1.0, supporting both text-to-video and image-to-video through `POST /v1/video-generation`. Starting from **0.1158 USD / second**. ## Updated models * **[gpt-image-2](/api-reference/openai/gpt-image-2)** — now accepts up to 10 reference `images` for image-to-image. * **[seedance-2-0](/api-reference/bytedance/seedance-2-0)** — adds new `audios`, `first_frame_image`, `last_frame_image`, and `videos` inputs. ## Heads up — API base URL changed The production base URL is now **`https://api.linkmodel.ai/api/v1`** (previously `api.linkmodel.ai`). Update your clients accordingly; the previous host will be retired. ## New models * **[gpt-image-2](/api-reference/openai/gpt-image-2)** — OpenAI's next-gen image model, now available through the unified `POST /v1/image-generation` endpoint. * **[seedance-2-0](/api-reference/bytedance/seedance-2-0)** — Bytedance Seedance 2.0, available through `POST /v1/video-generation`. ## Other updates * **Pricing** — [kling-v3](/api-reference/kling/kling-v3) now bills **per second** of generated video instead of per call. * **Changed** — [sora-2](/api-reference/openai/sora-2) now accepts a `resolution` parameter. Minor field-description refreshes on [gemini-3-pro-image-preview](/api-reference/google/gemini-3-pro-image-preview), [kling-v3](/api-reference/kling/kling-v3), and [minimax-hailuo-02](/api-reference/minimax/minimax-hailuo-02). ## Introducing LinkModel **One API for image and video generation. Save up to 30% versus official pricing.** LinkModel is now publicly available. Use a single Bearer-token API to access 12 generative models from OpenAI, Google, MiniMax, Kling, Bytedance, and Alibaba — without rewriting client code per provider. ### What's available today * **6 video models** — Sora 2, Kling v3, MiniMax Hailuo 2.3, MiniMax Hailuo 02, Wan 2.6, Seedance v1.5 Pro * **6 image models** — Gemini 3.1 / 3 Pro / 2.5 Flash, Seedream 4.0 / 4.5 / 5.0 Lite * **Two unified endpoints** — `POST /v1/video-generation` and `POST /v1/image-generation` * **One response envelope** — `{ code, data, msg, request_id }` across all endpoints ### Get started 1. Create an API key in your Dashboard 2. Browse all models, or jump into the [API Reference](/) 3. Copy any endpoint's cURL example, drop in your key, and run ### Pricing Pay per call. Starting from **0.02 USD / image** (Seedream 4.0 1K) and **0.07 USD / video** (Kling v3). Full per-model breakdown on the Pricing page. # Get Started Source: https://docs.linkmodel.ai/cli Use the official LinkModel CLI to generate images and videos from your terminal, scripts, and automation workflows. The LinkModel CLI is the official command-line client for LinkModel. Use it to create generation tasks, poll task status, download artifacts, inspect model schemas, and automate image or video generation from your terminal. ## Guides Install the CLI, verify the command, and choose between `lkm` and `linkmodel`. Configure API keys for local use, CI jobs, and one-off commands. Generate images, pass reference images, and download output files. Generate videos, set duration and resolution, and resume long-running tasks. Inspect bundled model parameters before choosing CLI flags. Use JSON output, exit codes, and task status commands in scripts. Diagnose authentication, parameter, timeout, and download issues. ## Common Workflow Install and authenticate once: ```bash theme={null} npm install -g linkmodel-cli lkm setup ``` Generate an image: ```bash theme={null} lkm image "a product photo on a clean studio background" ``` Generate a video: ```bash theme={null} lkm video "a cinematic product orbit" ``` Inspect model-specific flags: ```bash theme={null} lkm models show kling-v3 ``` ## Command Names The package installs two command names: | Command | Description | | ----------- | ----------------------------------------- | | `lkm` | Short command used throughout these docs. | | `linkmodel` | Descriptive alias with the same behavior. | ## Resources * GitHub: [linkmodelhq/linkmodel-cli](https://github.com/linkmodelhq/linkmodel-cli) * npm: [linkmodel-cli](https://www.npmjs.com/package/linkmodel-cli) # Authentication Source: https://docs.linkmodel.ai/cli-authentication Configure your LinkModel API key for local CLI usage, scripts, and CI jobs. Run the interactive setup flow: ```bash theme={null} lkm setup ``` Or configure your API key directly: ```bash theme={null} lkm auth login --api-key lkm auth status ``` Saved credentials are stored in `~/.linkmodel/config.json` with file mode `0600`. API keys are masked in normal command output. Authentication is resolved in this order: ```text theme={null} --api-key > LINKMODEL_API_KEY > ~/.linkmodel/config.json ``` ## Environment Variable Use `LINKMODEL_API_KEY` when running the CLI in CI, containers, or short-lived shell sessions: ```bash theme={null} export LINKMODEL_API_KEY="" lkm auth status ``` For a single command: ```bash theme={null} LINKMODEL_API_KEY="" lkm image "a product photo" ``` ## One-Off Key Pass `--api-key` when you do not want to write credentials to disk: ```bash theme={null} lkm image "a product photo" --api-key ``` ## Next Generate your first asset with [Image Generation](/cli-image-generation) or [Video Generation](/cli-video-generation). # Automation Source: https://docs.linkmodel.ai/cli-automation Use LinkModel CLI JSON output, exit codes, and status commands in scripts and CI workflows. Use `--json` for scripts and agents: ```bash theme={null} lkm image "a red panda" --json lkm video status --wait --json lkm doctor --json ``` In JSON mode, stdout contains exactly one JSON line. Human-readable logs go to stderr. ## Create Now, Poll Later Use `--no-wait` to create a task and return immediately: ```bash theme={null} lkm image "a product photo" --no-wait --json lkm video "a cinematic product orbit" --no-wait --json ``` Store the returned `task_id`, then resume polling later: ```bash theme={null} lkm image status --wait --json lkm video status --wait --json ``` ## CI Authentication Set `LINKMODEL_API_KEY` in your CI secret store, then run CLI commands without writing a local config file: ```bash theme={null} lkm auth status --json lkm image "a product photo" --json ``` ## Exit Codes | Code | Meaning | | ----- | --------------------------------------------------------------------- | | `0` | Success. | | `1` | Task failed, task cancelled, download failure, or API/network error. | | `2` | Usage error, invalid parameters, missing API key, or unknown command. | | `3` | Authentication failed. | | `4` | Polling timed out; the server task keeps running. | | `130` | Interrupted with `Ctrl-C`; the server task keeps running. | Handle `4` and `130` as resumable states when your workflow stores the `task_id`. # Image Generation Source: https://docs.linkmodel.ai/cli-image-generation Generate images with the LinkModel CLI and download the resulting artifacts. Create an image generation task and wait for completion: ```bash theme={null} lkm image "a red panda wearing round glasses" ``` `gen` is optional inside the `image` group: ```bash theme={null} lkm image "a product photo" lkm image gen "a product photo" ``` The built-in image default is `gpt-image-2`. ## Select a Model Use `-m` or `--model`: ```bash theme={null} lkm image gen "a product photo on a clean studio background" \ -m seedream-4.5 \ --max-images 2 ``` ## Reference Images Pass reference image URLs with `--image`. Repeat the flag for workflows that accept multiple references: ```bash theme={null} lkm image gen "turn this into a premium product shot" \ -m seedream-4.5 \ --image https://example.com/reference.png ``` ## Common Options | Option | Description | | ------------------------- | ------------------------------------------------------------- | | `-m, --model ` | Image model name. | | `-q, --quality ` | Quality setting when supported by the selected model. | | `-s, --size ` | `auto` or `x`. | | `-i, --image ` | Reference image URL, repeatable for image-to-image workflows. | | `-o, --out ` | Download directory. | | `--no-wait` | Create the task and print the `task_id` without waiting. | | `--no-download` | Wait for completion and print artifact URLs only. | | `--open` | Open downloaded artifacts with the system default app. | | `--json` | Print one JSON line for automation. | ## Resume an Image Task Use `status` after `--no-wait`, timeout, or `Ctrl-C`: ```bash theme={null} lkm image status lkm image status --wait ``` Server-side tasks continue running after local timeout or interruption. ## Related * [Model Schemas](/cli-model-schemas) * [Automation](/cli-automation) # Installation Source: https://docs.linkmodel.ai/cli-installation Install the LinkModel CLI and verify that it is available on your PATH. Install the CLI with npm: ```bash theme={null} npm install -g linkmodel-cli ``` Verify the install: ```bash theme={null} lkm --version lkm --help ``` The package installs two command names: | Command | Description | | ----------- | ----------------------------------------- | | `lkm` | Short command used throughout these docs. | | `linkmodel` | Descriptive alias with the same behavior. | Both commands call the same CLI. ## Update Use npm to update the global package: ```bash theme={null} npm install -g linkmodel-cli@latest ``` Check the installed version after updating: ```bash theme={null} lkm --version ``` ## Next Continue with [Authentication](/cli-authentication). # Model Schemas Source: https://docs.linkmodel.ai/cli-model-schemas Inspect bundled LinkModel schemas to discover model names, modalities, and model-specific CLI flags. The CLI ships generated schemas for image and video models, so normal command execution does not fetch metadata at runtime. List available models: ```bash theme={null} lkm models list lkm models list --modality image lkm models list --modality video ``` Inspect one model: ```bash theme={null} lkm models show kling-v3 lkm models show kling-v3 --json ``` Use schema output before scripting a model-specific workflow. It shows the model name, modality, supported parameters, and the flags generated from those parameters. ## Choosing Models Use the CLI schema commands when you are writing terminal workflows. Use the [Models](/models) page when you need pricing, provider grouping, and endpoint support. ## Updating Schemas Update the CLI package to receive newer bundled schemas: ```bash theme={null} npm install -g linkmodel-cli@latest ``` If a model appears in the hosted docs but not in your local CLI, update the package first and check again: ```bash theme={null} lkm --version lkm models list ``` # Troubleshooting Source: https://docs.linkmodel.ai/cli-troubleshooting Resolve common LinkModel CLI installation, authentication, schema, timeout, and download issues. ## Command Not Found Confirm the package is installed globally: ```bash theme={null} npm install -g linkmodel-cli lkm --version ``` If `lkm` is still unavailable, check that your global npm bin directory is on `PATH`. ## Missing API Key Run: ```bash theme={null} lkm auth status ``` Then configure credentials with either: ```bash theme={null} lkm setup ``` or: ```bash theme={null} export LINKMODEL_API_KEY="" ``` Authentication is resolved in this order: ```text theme={null} --api-key > LINKMODEL_API_KEY > ~/.linkmodel/config.json ``` ## Unknown Option Model-specific flags come from bundled schemas. Inspect the selected model before using provider-specific options: ```bash theme={null} lkm models show ``` If the hosted docs show a newer model or parameter, update the CLI: ```bash theme={null} npm install -g linkmodel-cli@latest ``` ## Timeout or Interrupted Task Server-side tasks continue running after local timeout or `Ctrl-C`. Resume with: ```bash theme={null} lkm image status --wait lkm video status --wait ``` ## Download Issues Use `--no-download` when you only need artifact URLs: ```bash theme={null} lkm image status --wait --no-download lkm video status --wait --no-download ``` # Video Generation Source: https://docs.linkmodel.ai/cli-video-generation Generate videos with the LinkModel CLI, configure model-specific options, and resume long-running tasks. Create a video generation task and wait for completion: ```bash theme={null} lkm video "Empty cinematic establishing shot of a misty city street after rain" ``` `gen` is optional inside the `video` group: ```bash theme={null} lkm video "a cinematic product orbit" lkm video gen "a cinematic product orbit" ``` The built-in video default is `kling-v3`. ## Select a Model Use `-m` or `--model`: ```bash theme={null} lkm video gen "a cinematic product orbit" \ -m kling-v3 \ --duration 5 \ --resolution 720P \ --size 16x9 \ --extends-cfg-scale 0.7 ``` Model-specific options are generated from bundled LinkModel schemas. For example, `kling-v3` exposes options such as `--duration`, `--resolution`, `--size`, `--extends-audio`, `--extends-cfg-scale`, `--first-frame-image`, and `--last-frame-image`. ## Image-to-Video Use model-specific frame fields when supported: ```bash theme={null} lkm video gen "animate this product with a slow camera move" \ -m kling-v3 \ --first-frame-image https://example.com/first-frame.png ``` Check the selected model schema before using frame or extension flags: ```bash theme={null} lkm models show kling-v3 ``` ## Resume a Video Task Use `status` after `--no-wait`, timeout, or `Ctrl-C`: ```bash theme={null} lkm video status lkm video status --wait lkm video status --wait --no-download ``` Server-side tasks continue running after local timeout or interruption. ## Related * [Model Schemas](/cli-model-schemas) * [Automation](/cli-automation) # FAQ Source: https://docs.linkmodel.ai/faq Common LinkModel questions grouped by setup, billing, API integration, task polling, CLI, and troubleshooting. Use these pages to find the right answer quickly. | Category | Questions covered | | --------------------------------------- | --------------------------------------------------------------------- | | [Authentication](/faq-authentication) | API keys, bearer tokens, environment variables, and key safety. | | [Billing & Pricing](/faq-billing) | How requests are priced, where to check usage, and what affects cost. | | [API Integration](/faq-api-integration) | Endpoint selection, schemas, SDK usage, and request formats. | | [Tasks & Polling](/faq-tasks) | `task_id`, terminal states, polling intervals, and output URLs. | | [CLI](/faq-cli) | CLI setup, credentials, JSON output, and automation workflows. | | [Troubleshooting](/faq-troubleshooting) | Common errors, failed tasks, missing outputs, and support details. | ## Most common questions ### Which endpoint should I call? Use `POST /image-generation` for image models and `POST /video-generation` for video models. Chat-compatible endpoints are listed separately in the API Reference. ### Why does the create endpoint return a task instead of the final asset? Image and video generation can take time, so create endpoints return a `task_id`. Use the matching query endpoint to poll status and retrieve final output URLs when generation completes. ### How do I know which parameters a model supports? Open the model page in the API Reference. Each model page defines the exact request schema, required fields, enum values, defaults, pricing notes, and live request playground. ### What should I include when contacting support? Include the `request_id`, `task_id`, model name, endpoint, request payload, and the approximate request time. Do not share your API key. # API Integration Source: https://docs.linkmodel.ai/faq-api-integration Endpoint selection, schemas, SDK usage, and request formats. ## Which endpoint should I call? Use `POST /image-generation` for image models and `POST /video-generation` for video models. Use `POST /chat/completions` for OpenAI-compatible chat requests and `POST /messages` for Anthropic-compatible messages. ## How do I know which parameters a model supports? Open the model page in the API Reference. Each model page defines required fields, optional fields, enum values, defaults, descriptions, and example requests. ## Can I reuse existing OpenAI or Anthropic SDKs? For chat-compatible endpoints, yes. Use `POST /chat/completions` for OpenAI-style integrations and `POST /messages` for Anthropic-style integrations. Image and video generation use LinkModel's task-based endpoints. ## Why are some fields model-specific? Providers expose different controls. LinkModel keeps each model schema explicit so unsupported fields are not silently accepted. ## What content type should I send? Use JSON: ```bash theme={null} Content-Type: application/json ``` # Authentication Source: https://docs.linkmodel.ai/faq-authentication API keys, bearer tokens, environment variables, and key safety. ## How do I authenticate API requests? Pass your API key as a bearer token: ```bash theme={null} Authorization: Bearer ``` ## Where do I get an API key? Create and manage keys in the [Dashboard](https://linkmodel.ai/en/dashboard). ## Should I put the API key in client-side code? No. Treat API keys as secrets. Keep them on your server, in environment variables, or in a secret manager. ## Can I use an environment variable? Yes. For local scripts: ```bash theme={null} export LINKMODEL_API_KEY="" ``` The LinkModel CLI can also read `LINKMODEL_API_KEY`. ## What should I do if a key leaks? Rotate the key immediately from the Dashboard, update your deployment secrets, and remove the leaked key from logs or repositories. # Billing & Pricing Source: https://docs.linkmodel.ai/faq-billing How requests are priced, where to check usage, and what affects cost. ## Where can I see model pricing? Open the model page in the API Reference or browse the [model catalog](https://linkmodel.ai/en/models). Pricing can differ by model and unit, such as per call, per second, per image, or token-based billing. ## When is cost calculated? Generation task creation returns pricing information when available. Final billing depends on the selected model and the provider pricing rules for that model. ## Why do different models use different pricing units? LinkModel unifies access across providers, but providers price workloads differently. Video models may charge by call or second, image models may charge by image or call, and chat-style models may use token-based billing. ## How should I estimate cost before production use? Start with one model, log model name and task count, and compare usage against the model catalog pricing. For production, keep request volume, retries, polling intervals, and failed-task handling visible in your own metrics. ## Can I reduce cost? Choose lighter models for drafts, limit unnecessary retries, avoid overly dense polling, and use higher-cost models only for final output. # CLI Source: https://docs.linkmodel.ai/faq-cli Common questions about LinkModel CLI setup, credentials, automation, and troubleshooting. ## How do I install the CLI? See [CLI Installation](/cli-installation). ## How do I authenticate the CLI? See [CLI Authentication](/cli-authentication). The CLI supports interactive setup, `LINKMODEL_API_KEY`, and one-off `--api-key` usage. ## Can I use the same API key for the CLI and API? Yes. The CLI uses the same LinkModel API key as direct API calls. ## Can I use the CLI in scripts? Yes. Use `--json` for automation: ```bash theme={null} lkm image "a product photo" --json lkm video status --wait --json ``` For script patterns and exit codes, see [CLI Automation](/cli-automation). ## Why does my task keep running after timeout or Ctrl-C? Generation tasks run server-side. If the local CLI times out or is interrupted, resume with `lkm image status --wait` or `lkm video status --wait`. ## Where do I find model-specific options? Use [Model Schemas](/cli-model-schemas) to inspect the flags generated for each model. ## Where do I find the full CLI guide? Open the [CLI guide](/cli). # Tasks & Polling Source: https://docs.linkmodel.ai/faq-tasks task_id, terminal states, polling intervals, and output URLs. ## Why does generation return a task? Image and video generation can take time. Create endpoints return a `task_id` so your app can poll for status without blocking the initial request. ## Which query endpoint should I use? | Task type | Query endpoint | | ---------------- | ----------------------------- | | Image generation | `GET /query/image-generation` | | Video generation | `GET /query/video-generation` | ## When should I stop polling? Stop when `status` is `Success`, `Failed`, or `Cancelled`. ## Where do I find the final output? For image tasks, successful responses include `output_images`. For video tasks, successful responses include `file_url`. ## How often should I poll? For images, wait about 10 seconds before polling, then poll every few seconds. For videos, wait about 30 seconds before polling, then use a slower interval as the task ages. Avoid polling every second in production. ## Why do query endpoints use `message` instead of `msg`? The create endpoints use `msg`, while query endpoints use `message` at the envelope level. Plan for both field names when parsing responses. # Troubleshooting Source: https://docs.linkmodel.ai/faq-troubleshooting Common errors, failed tasks, missing outputs, and support details. ## I get a 401 error. What should I check? Confirm that the `Authorization` header is present, uses the `Bearer` scheme, and contains a valid API key. ## I get a 400 error. What should I check? Open the model page in the API Reference and compare your request against the schema. Check required fields, enum values, URL fields, and model-specific options. ## My task is still processing. What should I do? Keep polling with a reasonable interval. Video generation can take several minutes. Stop and surface an error if the task does not complete within your product's timeout window. ## My task failed. What should I include in logs? Log the model name, endpoint, request payload, `task_id`, `request_id`, status, and error message. Do not log API keys. ## What should I include when contacting support? Include the `request_id`, `task_id`, model name, endpoint, request payload, approximate request time, and the observed error. Do not share your API key. # First API Call Source: https://docs.linkmodel.ai/first-api-call Create your first generation task, poll its status, and retrieve the generated asset. ## 1. Get an API key Create an API key in the [Dashboard](https://linkmodel.ai/en/dashboard). Use it as a bearer token: ```bash theme={null} Authorization: Bearer ``` For local scripts, store it in an environment variable: ```bash theme={null} export LINKMODEL_API_KEY="" ``` ## 2. Choose an endpoint | Use case | Endpoint | | ----------------------------- | ----------------------------- | | Generate or edit images | `POST /image-generation` | | Generate videos | `POST /video-generation` | | Poll image tasks | `GET /query/image-generation` | | Poll video tasks | `GET /query/video-generation` | | OpenAI-compatible chat | `POST /chat/completions` | | Anthropic-compatible messages | `POST /messages` | ## 3. Create a task This example creates a video task: ```bash theme={null} curl --request POST \ --url https://api.linkmodel.ai/api/v1/video-generation \ --header "Authorization: Bearer $LINKMODEL_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "sora-2", "prompt": "A golden retriever catching a frisbee in slow motion" }' ``` The response includes a `task_id`: ```json theme={null} { "code": 0, "data": { "task_id": "aurora_abc123", "status": "processing" }, "msg": "success", "request_id": "250b66dd-e1fb-4bb6-b5f6-c668efadc35d" } ``` ## 4. Poll the task Use the `task_id` with the matching query endpoint: ```bash theme={null} curl --request GET \ --url "https://api.linkmodel.ai/api/v1/query/video-generation?task_id=aurora_abc123" \ --header "Authorization: Bearer $LINKMODEL_API_KEY" ``` Stop polling when `status` is `Success`, `Failed`, or `Cancelled`. When video generation succeeds, `file_url` contains the generated video URL. For image tasks, `output_images` contains generated image URLs. ## 5. Check usage and cost The create response includes pricing information when available. For model-level pricing and parameters, open the model page in the API Reference or browse the [model catalog](https://linkmodel.ai/en/models). ## Next Use [Models](/models) to pick the best model family, or open the API Reference for exact request schemas. # Quickstart Source: https://docs.linkmodel.ai/index Find the fastest path to your first LinkModel integration. LinkModel gives you one API for image, video, and chat-compatible model workflows. Use this page as a starting map, then open the focused guide that matches what you want to do next. ## Quick paths Create a generation task, poll its status, and retrieve the output asset. Compare image, video, and chat model families before choosing an endpoint. Configure LinkModel chat models in DeepSeek Harness, OpenCode, Claude Code, and Codex. Inspect exact request schemas, required fields, enum values, and live examples. Generate images and videos from your terminal or automation scripts. Find answers for auth, billing, integration, task polling, CLI, and troubleshooting. Create API keys, manage account settings, and review usage. ## Essentials | Item | Value | | -------------- | -------------------------------------- | | Base URL | `https://api.linkmodel.ai/api/v1` | | Authentication | `Authorization: Bearer ` | | Image endpoint | `POST /image-generation` | | Video endpoint | `POST /video-generation` | | Image polling | `GET /query/image-generation` | | Video polling | `GET /query/video-generation` | ## Next Continue with [First API Call](/first-api-call), then open the API Reference tab for exact parameters, pricing, and live examples. # Models Source: https://docs.linkmodel.ai/models Choose the right LinkModel model family before opening the API Reference. Use this page for model selection. Use the API Reference for exact schema, enum values, defaults, and live requests. ## Image models | Model | Provider | Best for | Endpoint | | -------------------------------- | --------- | ------------------------------------------- | ------------------------ | | `seedream-4.0` | Bytedance | General image generation and editing | `POST /image-generation` | | `seedream-4.5` | Bytedance | Higher-quality image generation and editing | `POST /image-generation` | | `seedream-5.0-lite` | Bytedance | Lower-cost image workflows | `POST /image-generation` | | `seedream-5.0-pro` | Bytedance | Pro-quality image generation | `POST /image-generation` | | `gemini-2.5-flash-image` | Google | Fast image generation and editing | `POST /image-generation` | | `gemini-3-pro-image-preview` | Google | Advanced image generation previews | `POST /image-generation` | | `gemini-3.1-flash-image-preview` | Google | Fast image generation previews | `POST /image-generation` | | `gemini-3.1-flash-lite-image` | Google | Lightweight image generation | `POST /image-generation` | | `gpt-image-2` | OpenAI | OpenAI image generation workflows | `POST /image-generation` | ## Video models | Model | Provider | Best for | Endpoint | | -------------------- | --------- | ------------------------------------------------- | ------------------------ | | `happyhorse-1.0` | Alibaba | Image-to-video and video generation workflows | `POST /video-generation` | | `wan2.6` | Alibaba | High-quality video generation | `POST /video-generation` | | `seedance-2-0` | Bytedance | Controllable text-to-video and image-to-video | `POST /video-generation` | | `seedance-v1.5-pro` | Bytedance | General video generation | `POST /video-generation` | | `kling-v3` | Kling | High-quality video with strong visual consistency | `POST /video-generation` | | `MiniMax-Hailuo-02` | MiniMax | Hailuo video generation | `POST /video-generation` | | `MiniMax-Hailuo-2.3` | MiniMax | Newer Hailuo video generation | `POST /video-generation` | | `sora-2` | OpenAI | OpenAI video generation workflows | `POST /video-generation` | ## Chat models | Model | Provider | Best for | Endpoints | | ------------------------ | --------- | ---------------------------------------- | ------------------------------------------------------------- | | `claude-opus-4-6` | Anthropic | Claude Opus chat and reasoning workflows | `POST /chat/completions`, `POST /messages` | | `claude-opus-4-7` | Anthropic | Claude Opus chat and reasoning workflows | `POST /chat/completions`, `POST /messages` | | `claude-opus-4-8` | Anthropic | Claude Opus chat and reasoning workflows | `POST /chat/completions`, `POST /messages` | | `claude-sonnet-4-6` | Anthropic | Claude Sonnet chat and coding workflows | `POST /chat/completions`, `POST /messages` | | `deepseek-v4-flash` | DeepSeek | Fast DeepSeek chat workflows | `POST /chat/completions`, `POST /messages` | | `deepseek-v4-pro` | DeepSeek | DeepSeek reasoning and coding workflows | `POST /chat/completions`, `POST /messages` | | `gemini-2.5-flash` | Google | Fast Gemini chat workflows | `POST /chat/completions`, `POST /messages` | | `gemini-2.5-pro` | Google | Gemini pro chat and reasoning workflows | `POST /chat/completions`, `POST /messages` | | `gemini-3-flash-preview` | Google | Gemini preview chat workflows | `POST /chat/completions`, `POST /messages` | | `gemini-3.1-flash-lite` | Google | Lightweight Gemini chat workflows | `POST /chat/completions`, `POST /messages` | | `gemini-3.1-pro-preview` | Google | Gemini pro preview chat workflows | `POST /chat/completions`, `POST /messages` | | `gemini-3.5-flash` | Google | Fast Gemini chat workflows | `POST /chat/completions`, `POST /messages` | | `glm-5.1` | Z.ai | GLM chat and coding workflows | `POST /chat/completions`, `POST /messages` | | `gpt-5` | OpenAI | GPT chat and reasoning workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.2` | OpenAI | GPT chat and reasoning workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.3-codex` | OpenAI | Codex and agentic coding workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.4` | OpenAI | GPT chat and reasoning workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.4-mini` | OpenAI | Lower-latency GPT chat workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.4-pro` | OpenAI | Higher-capability GPT chat workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.5` | OpenAI | GPT chat and reasoning workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.6-luna` | OpenAI | GPT chat and reasoning workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.6-sol` | OpenAI | GPT chat, reasoning, and Codex workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `gpt-5.6-terra` | OpenAI | GPT chat and reasoning workflows | `POST /chat/completions`, `POST /messages`, `POST /responses` | | `kimi-k2.6` | Moonshot | Kimi chat and reasoning workflows | `POST /chat/completions`, `POST /messages` | | `kimi-k3` | Moonshot | Kimi chat and reasoning workflows | `POST /chat/completions`, `POST /messages` | | `minimax-m2.7` | MiniMax | MiniMax chat workflows | `POST /chat/completions`, `POST /messages` | ## Chat endpoints | Endpoint | Format | Use when | | ------------------------ | --------------------------- | ----------------------------------------------------------------- | | `POST /chat/completions` | OpenAI-compatible | Your app already uses the OpenAI Chat Completions format. | | `POST /messages` | Anthropic-compatible | Your app already uses the Anthropic Messages format. | | `POST /responses` | OpenAI Responses-compatible | You are configuring Codex with a GPT-series LinkModel chat model. | ## Selection guide | Goal | Start with | | ------------------------------------- | ------------------------------------------------------- | | Fast image experimentation | `gemini-2.5-flash-image` or `seedream-5.0-lite` | | Higher-quality image output | `seedream-5.0-pro`, `seedream-4.5`, or `gpt-image-2` | | Text-to-video scenes | `sora-2`, `kling-v3`, or `seedance-2-0` | | Image-to-video animation | `kling-v3`, `seedance-2-0`, or `happyhorse-1.0` | | OpenAI-compatible chat integration | `POST /chat/completions` | | Anthropic-compatible chat integration | `POST /messages` | | Codex model provider | `gpt-5.3-codex` or `gpt-5.6-sol` with `POST /responses` | ## Next Open the API Reference tab and select a model to inspect its required fields, defaults, and response schema.