Skip to content

OpenAI Format ​

List the models available for the current account, returning model information in OpenAI's standard format.

List Models ​

http
GET /v1/models
bash
curl --location --request GET 'https://neolink.com/api/v1/models' \
--header 'Authorization: Bearer <API Key>'
python
import requests

url = "https://neolink.com/api/v1/models"

headers = {
    "Authorization": "Bearer <API Key>",
}

response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
result = response.json()
print(result)

Response Example ​

json
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1715367049,
      "owned_by": "openai"
    },
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "created": 1721172745,
      "owned_by": "openai"
    }
  ]
}

Response Fields ​

FieldTypeDescription
objectstringObject type of the response, always list
dataarrayList of models
data[].idstringModel ID, used when calling the API
data[].objectstringObject type, always model
data[].createdintegerModel creation timestamp (seconds)
data[].owned_bystringThe party that owns the model

Format Auto-Detection: The same endpoint auto-detects the response format based on the request headers:

  • Returns Anthropic format when the x-api-key and anthropic-version headers are present
  • Returns Gemini format when the x-goog-api-key header or key query parameter is present
  • Returns OpenAI format in all other cases