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
AuthorizationstringRequiredBearer <API_KEY>.
Returns
HTTP 200.
objectstringOptionalAlways
list.successbooleanOptionalAlways
true.dataobject[]OptionalModels.
Show child fields (5)
idstringOptionalModel ID used as
model.objectstringOptionalAlways
model.createdintegerOptionalUnix seconds.
owned_bystringOptionalOwner label, for display only.
supported_endpoint_typesstring[]OptionalSupported endpoint types.
Supported values
openai-videoVideo; use/v1/videosimage-generationImage; use/v1/images/*
Errors
| HTTP | code | Cause and action |
|---|---|---|
| 401 | — | The API key is invalid, expired or disabled. |
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()){
"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"
]
}
]
}Related
API reference overview
Authentication, media URLs, idempotency and errors.
Integration guide
The full flow from API key to downloaded result.