Skip to content

List models

GET/v1/models

List the models your API key can call. Keys with model restrictions return only the allowed models. See each endpoint page for parameter rules.

Headers

  • AuthorizationstringRequired

    Bearer <API_KEY>.

Returns

HTTP 200.

  • objectstringOptional

    Always list.

  • successbooleanOptional

    Always true.

  • dataobject[]Optional

    Models.

    Show child fields (5)
    • idstringOptional

      Model ID used as model.

    • objectstringOptional

      Always model.

    • createdintegerOptional

      Unix seconds.

    • owned_bystringOptional

      Owner label, for display only.

    • supported_endpoint_typesstring[]Optional

      Supported endpoint types.

      Supported values

      • openai-videoVideo; use /v1/videos
      • image-generationImage; use /v1/images/*

Errors

HTTPcodeCause and action
401—The API key is invalid, expired or disabled.
List available models
curl https://ling-light.com/v1/models \
  -H "Authorization: Bearer $LINGLIGHT_API_KEY"
const response = await fetch('https://ling-light.com/v1/models', {
  headers: {
    Authorization: `Bearer ${process.env.LINGLIGHT_API_KEY}`,
  },
})
console.log(response.status, await response.json())
import os

import requests

response = requests.get(
    "https://ling-light.com/v1/models",
    headers={
        "Authorization": f"Bearer {os.environ['LINGLIGHT_API_KEY']}",
    },
    timeout=60,
)
print(response.status_code, response.json())
Response
{
  "object": "list",
  "success": true,
  "data": [
    {
      "id": "seedance2.0",
      "object": "model",
      "created": 1626777600,
      "owned_by": "custom",
      "supported_endpoint_types": [
        "openai-video"
      ]
    },
    {
      "id": "gpt-image-2.6",
      "object": "model",
      "created": 1626777600,
      "owned_by": "custom",
      "supported_endpoint_types": [
        "image-generation"
      ]
    }
  ]
}
API reference overview
Authentication, media URLs, idempotency and errors.
Integration guide
The full flow from API key to downloaded result.
Last updated