> ## 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.

# Image generation

> This historical endpoint remains supported with no announced sunset date. New integrations should use `POST /v1/images/generations`.

The request body uses the same model-specific fields shown on the primary image model pages. The generic schema below requires `model` and allows those additional fields without duplicating every model schema here.

If a POST request times out or returns an uncertain result, do not blindly retry it. A retry can create another task and billing order.




## OpenAPI

````yaml /openapi/legacy/_image-create.yaml post /image-generation
openapi: 3.0.3
info:
  title: Image generation
  version: 1.0.0
  description: Historical image creation endpoint retained for existing integrations.
servers:
  - url: https://api.linkmodel.ai/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: legacy
paths:
  /image-generation:
    post:
      tags:
        - legacy
      summary: Image generation
      description: >
        This historical endpoint remains supported with no announced sunset
        date. New integrations should use `POST /v1/images/generations`.


        The request body uses the same model-specific fields shown on the
        primary image model pages. The generic schema below requires `model` and
        allows those additional fields without duplicating every model schema
        here.


        If a POST request times out or returns an uncertain result, do not
        blindly retry it. A retry can create another task and billing order.
      operationId: legacy-image-generation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
              additionalProperties: true
              properties:
                model:
                  type: string
                  description: Image model id from `GET /v1/models`.
                  example: seedream-4.0
                prompt:
                  type: string
                  example: A red panda coding at a laptop
      responses:
        '200':
          description: Business response containing `data.task_id` when `code=0`.
        '401':
          description: Unauthorized — missing or invalid API key.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````