跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.metask.ai/llms.txt

Use this file to discover all available pages before exploring further.

The models endpoint returns every AI model that your account can access through the gateway. Call this endpoint to discover available model IDs, then pass those IDs in the model field of your chat completion requests. The response format matches the OpenAI models list API exactly.

Endpoint

GET https://napi.origintask.cn/v1/models

Authentication

Pass your API key as a Bearer token in the Authorization header. See API Authentication for details.

Request parameters

This endpoint takes no query parameters or request body.

Response fields

object
string
Always "list".
data
object[]
An array of model objects, one per available model.

Examples

curl https://napi.origintask.cn/v1/models \
  --request GET \
  --header "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "created": 1721736000,
      "owned_by": "openai"
    },
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1715385600,
      "owned_by": "openai"
    },
    {
      "id": "claude-3-5-sonnet-20241022",
      "object": "model",
      "created": 1729555200,
      "owned_by": "anthropic"
    },
    {
      "id": "gemini-1.5-pro",
      "object": "model",
      "created": 1714608000,
      "owned_by": "google"
    }
  ]
}
The list of available models may change as new models are added or retired. Fetch the models list dynamically in your application rather than hardcoding model IDs.