> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkmodel.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Legacy API compatibility

> Historical image and video generation routes, compatibility guarantees, and migration mappings.

The historical generation routes remain supported with no announced sunset date. Existing integrations do not need to migrate immediately. New integrations should use the resource-oriented REST routes because creation and task lookup share one resource path.

## Endpoint mappings

| Operation         | Primary REST endpoint               | Historical endpoint                             |
| ----------------- | ----------------------------------- | ----------------------------------------------- |
| Create image task | `POST /images/generations`          | `POST /image-generation`                        |
| Query image task  | `GET /images/generations/{task_id}` | `GET /query/image-generation?task_id={task_id}` |
| Create video task | `POST /videos/generations`          | `POST /video-generation`                        |
| Query video task  | `GET /videos/generations/{task_id}` | `GET /query/video-generation?task_id={task_id}` |

All paths use the public base URL `https://api.linkmodel.ai/v1`. Generation and task-query endpoints require the same Bearer API key; `GET /models` is public.

## Compatibility guarantees

* Historical request bodies keep their existing format.
* New and historical create endpoints enter the same task orchestration and billing flow.
* Tasks created through either API style can be queried through either query style.
* Query results are semantically equivalent except for dynamically signed output URLs.
* The historical routes are supported compatibility endpoints, not redirects.

## Request schemas

The primary model pages remain the single source of truth for model-specific fields, required parameters, enum values, and limits. Use the same request body with the mapped historical create endpoint when maintaining an existing integration.

## Safe retry behavior

Do not blindly retry a create POST when the request times out or the response is uncertain. The first request may already have created a generation task and billing order. Record `request_id` and `task_id` whenever they are available, and confirm task state before deciding whether to create another task.

## Signed output URLs

`output_images` and `file_url` contain dynamically signed URLs. Download or copy assets that must be retained. Do not use these URLs as long-lived cache keys, database identity values, or response-equivalence checks.

## Discover models

Use public `GET /models` to retrieve the currently visible catalog without an API key. A listed model is not a guarantee that every parameter combination has a billable SKU; consult the model's API Reference page for its supported schema and pricing.
