Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Agnes AI

English 简体中文 Error Codes | 常见错误码

Official gateway and model catalog for Agnes AI.

Agnes AI gives developers OpenAI-compatible access to multimodal models for text, image, video, and agent workflows through a unified API gateway.

Documentation Status

FieldValue
Public documentation version2026.07.30
Last updated2026-07-30 00:00 Asia/Singapore
Source of truthOfficial website and API platform
Change noticeModel availability, rate limits, pricing, and quota rules may change over time. Always confirm production-critical values in the official docs or platform console.

Quick Links

ResourceURL
International sitehttps://agnes-ai.com/
China sitehttps://agnes-ai.cn/
Developer Docshttps://agnes-ai.com/doc/overview
API Platformhttps://platform.agnes-ai.com/
API Base URLhttps://apihub.agnes-ai.com/v1

Agnes AI provides two official sites: the International site and the China site. Choose the site that matches your region and service needs.

Developer Resources

ResourcePurpose
MODEL_CATALOG.mdModel families, endpoints, current reference limits, and compatibility notes.
CHANGELOG.mdPublic documentation, model, quota, and integration updates.
SUPPORT.mdWhere to ask for help, what belongs in issues, and what belongs in discussions.
docs/TROUBLESHOOTING.mdAPI error codes, debugging checklist, and retry guidance.
docs/ERROR_CODES.mdBilingual common API status codes, causes, and recommended fixes.
docs/FAQ.mdCommon questions about access, limits, models, and video polling.
docs/TOKEN_PLAN_FAQ.mdToken Plan access types, RPM limits, subscription quotas, and API key limit pools.
docs/DISCUSSIONS.mdRecommended discussion categories and community workflow.
examples/Minimal curl, Python, and Node.js examples.

Models

ModelTypeEndpointHighlights
agnes-2.5-flashText and vision-language/v1/chat/completionsUpgraded coding, agent workflows, tool calling, multi-turn dialogue, reasoning, and image understanding
agnes-2.0-flashText and vision-language/v1/chat/completionsReasoning, coding, tool calling, streaming, image understanding, agent workflows
agnes-image-2.0-flashImage generation and editing/v1/images/generationsText-to-image, image-to-image, URL or Base64 output
agnes-image-2.1-flashImage generation and editing/v1/images/generationsHigh-density visual generation, image editing, flexible sizes, URL or Base64 output
agnes-video-v2.0Video generation/v1/videosText-to-video, image-to-video, multi-image video, keyframe animation, async task API

Python Quick Start

Install the example dependencies:

pip install -r requirements.txt
export AGNES_API_KEY="your_api_key_here"

Run a streaming chat completion:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_AGNES_API_KEY",
    base_url="https://apihub.agnes-ai.com/v1",
)

response = client.chat.completions.create(
    model="agnes-2.5-flash",
    messages=[
        {"role": "user", "content": "Write a short intro to Agnes AI."}
    ],
    stream=True,
)

for chunk in response:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="")

Python examples:

ExamplePurpose
examples/python/chat.pyStreaming chat completion with agnes-2.5-flash.
examples/python/openai_compatible.pyMinimal OpenAI-compatible client configuration.
examples/python/image_generation.pyText-to-image request with agnes-image-2.1-flash.
examples/python/video_generation.pyText-to-video task creation and video_id polling.
examples/python/agent_workflow.pyTool-calling style agent workflow example.

Current Access and Limits

The values below are current public reference values as of 2026-06-28. Base Token Plan quotas were published on 2026-06-22; video RPM limits were updated on 2026-06-28. These are operational limits, not permanent guarantees.

User Plans

User planText model RPMImage model RPMVideo model RPM and quota
Free / default20 actual RPMResolution-specific RPM limits apply1 actual RPM
Enterprise40 actual RPMHigher resolution-specific RPM limits apply2 actual RPM
Token Plan1,000 actual RPM for text modelsHigher 1K and 2K image RPM limits apply5 actual RPM; 500 seconds per day

Subscription Quotas

Planagnes-2.0-flashagnes-image-2.0/2.1-flashagnes-video-v2.0
Starter1,500 requests per 5 hours; 15,000 requests per week4,000 images per day500 seconds per day
Plus7,500 requests per 5 hours; 75,000 requests per week4,000 images per day500 seconds per day
Pro30,000 requests per 5 hours; 300,000 requests per week4,000 images per day500 seconds per day

For detailed per-model RPM tables, quota rules, and API key pool behavior, see MODEL_CATALOG.md and docs/TOKEN_PLAN_FAQ.md.

Chat Example

curl https://apihub.agnes-ai.com/v1/chat/completions \
  -H "Authorization: Bearer $AGNES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-2.0-flash",
    "messages": [
      {
        "role": "user",
        "content": "Explain how to integrate an OpenAI-compatible API gateway."
      }
    ],
    "stream": true
  }'

Image Example

curl https://apihub.agnes-ai.com/v1/images/generations \
  -H "Authorization: Bearer $AGNES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-image-2.1-flash",
    "prompt": "A luminous floating city above a misty canyon at sunrise, cinematic realism",
    "size": "1024x768"
  }'

Video Example

curl -X POST https://apihub.agnes-ai.com/v1/videos \
  -H "Authorization: Bearer $AGNES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "agnes-video-v2.0",
    "prompt": "A cinematic shot of a cat walking on the beach at sunset, soft ocean waves, warm golden lighting, realistic motion",
    "height": 768,
    "width": 1152,
    "num_frames": 121,
    "frame_rate": 24
  }'

Video generation is asynchronous. Create a task first, then query the result with the returned video_id.

GET https://apihub.agnes-ai.com/agnesapi?video_id=<VIDEO_ID>

Use video_id for video result polling. Do not use task_id for current video result queries unless a specific legacy workflow explicitly requires it.

Common Integration Notes

  • Use Authorization: Bearer YOUR_API_KEY for every request.
  • Keep API keys in server-side environment variables. Never expose keys in client-side code or public repositories.
  • agnes-2.5-flash is fully available to users with Agnes API access. It is OpenAI-compatible with agnes-2.0-flash: the base URL, endpoint, request format, streaming, tool calling, and image URL input stay the same. Current public reference: 512K context and 65.5K maximum output. Availability, rate limits, and billing are determined by account and API key permissions.
  • agnes-2.0-flash currently supports a 256K context window and 64K max output reference limit after the June 2026 rollback from the temporary 1M context window.
  • Thinking mode, streaming, tool calling, and vision inputs are supported on compatible chat workflows. Check the model-specific docs before enabling advanced parameters in production.
  • For 400 responses, verify required parameters, request body shape, image URL accessibility, and response format placement.
  • For 401 responses, verify the API key, bearer token format, account status, and environment variable loading.
  • For 429 responses, reduce concurrency, add retry with backoff, and check the current plan-level RPM limit.
  • For 500, 502, 503, or 520 responses, retry with exponential backoff and inspect whether the request payload can be simplified.

Security

Never commit API keys, tokens, .env files, screenshots containing secrets, or private data.

Use environment variables for local development:

export AGNES_API_KEY="your_api_key_here"

Documentation

See the official docs for model-specific parameters, response formats, pricing, limits, and troubleshooting:

关于 About

Official Agnes AI gateway and model catalog for OpenAI-compatible text, image, video, and agent workflows.
agnes-aiai-apifree-apimultimodal-ai

语言 Languages

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
62
Total Commits
峰值: 39次/周
Less
More

核心贡献者 Contributors