跳转到主要内容

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.

元任务 AI 网关 gives you access to models from multiple AI providers through a single endpoint. Rather than hardcoding a fixed list here — which changes as providers release new versions — the gateway exposes a standard models endpoint that always returns the current set of available models for your account.

List available models

Use the /v1/models endpoint to retrieve the models your subscription can access:
curl https://napi.origintask.cn/v1/models \
  -H "Authorization: Bearer your-metask-api-key"
The response follows the OpenAI models list format:
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1715367049,
      "owned_by": "openai"
    },
    {
      "id": "claude-3-5-sonnet-20241022",
      "object": "model",
      "created": 1729555200,
      "owned_by": "anthropic"
    },
    {
      "id": "gemini-1.5-pro",
      "object": "model",
      "created": 1712620800,
      "owned_by": "google"
    }
  ]
}
Always use the /v1/models endpoint to get the current list of available models. New models are added regularly and the response reflects what your subscription tier can access.

Model ID format

Each model has an id field that you use in API requests. Model IDs generally follow the naming convention of the originating provider:
  • OpenAI models: gpt-4o, gpt-4o-mini, o1, o3-mini
  • Anthropic models: claude-3-5-sonnet-20241022, claude-3-haiku-20240307
  • Google models: gemini-1.5-pro, gemini-2.0-flash
Use the exact id string from the models list response when making requests. Model aliases or shortened names may not resolve correctly.

Specifying a model in a request

Pass the model ID in the model field of your chat completions request:
from openai import OpenAI

client = OpenAI(
    api_key="your-metask-api-key",
    base_url="https://napi.origintask.cn/v1",
)

response = client.chat.completions.create(
    model="claude-3-5-sonnet-20241022",
    messages=[
        {"role": "user", "content": "Summarize the key points of the Kyoto Protocol."}
    ],
)

print(response.choices[0].message.content)

Model availability by subscription tier

Not all models are available on every subscription plan. Higher-tier plans unlock access to more capable or higher-capacity models. If a model appears in your /v1/models response, your current subscription supports it.
If you request a model that is not available on your subscription tier, the API returns an error. Upgrade your plan in the dashboard to access additional models.

View available models

See the full GET /v1/models API reference to fetch the current model list for your account.

Manage your subscription

Upgrade your plan in the 元任务 dashboard to unlock access to additional models.