diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index a045cbba..16ee855e 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -330,6 +330,8 @@ * [Glm 5.1](api-references/text-models-llm/zhipu/glm-5.1.md) * [Glm 5.2](api-references/text-models-llm/zhipu/glm-5.2.md) * [Zhipu AI](api-references/text-models-llm/zhipu-ai.md) + * [Zhipu AI](api-references/text-models-llm/Zhipu-AI/README.md) + * [Glm 5.2](api-references/text-models-llm/Zhipu-AI/glm-5.2.md) * [Image Models](api-references/image-models/README.md) * [Alibaba Cloud](api-references/image-models/alibaba-cloud/README.md) * [Qwen Image](api-references/image-models/alibaba-cloud/qwen-image.md) diff --git a/docs/api-references/model-database.md b/docs/api-references/model-database.md index 28889137..d8883f14 100644 --- a/docs/api-references/model-database.md +++ b/docs/api-references/model-database.md @@ -46,7 +46,7 @@ Can't find the model you need? Join our [Discord community](https://discord.gg/8 ### Text Models (LLM) -
Model ID + API Reference linkDeveloperContextModel Card
gpt-3.5-turboOpen AI16,000Chat GPT 3.5 Turbo
gpt-3.5-turbo-0125Open AI16,000Chat GPT-3.5 Turbo 0125
gpt-3.5-turbo-1106Open AI16,000Chat GPT-3.5 Turbo 1106
gpt-4o-2024-08-06Open AI128,000GPT-4o-2024-08-06
gpt-4o-2024-05-13Open AI128,000GPT-4o-2024-05-13
gpt-4o-miniOpen AI128,000Chat GPT 4o mini
gpt-4o-mini-2024-07-18Open AI128,000GPT 4o mini
gpt-4o-search-previewOpen AI128,000GPT-4o Search Preview
gpt-4o-mini-search-previewOpen AI128,000GPT-4o Mini Search Preview
o1Open AI200,000OpenAI o1
openai/o3-2025-04-16Open AI200,000o3
o3-miniOpen AI200,000OpenAI o3 mini
openai/o3-proOpen AI200,000o3-pro
openai/gpt-4.1-2025-04-14Open AI1,000,000GPT-4.1
openai/gpt-4.1-mini-2025-04-14Open AI1,000,000GPT-4.1 Mini
openai/gpt-4.1-nano-2025-04-14Open AI1,000,000GPT-4.1 Nano
openai/o4-mini-2025-04-16Open AI200,000GPT-o4-mini-2025-04-16
openai/gpt-oss-20bOpen AI128,000GPT OSS 20B
tencent/hy3Tencent262,144-
openai/gpt-oss-120bOpen AI128,000GPT OSS 120B
openai/gpt-latestOpen AI400,000GPT Latest
openai/gpt-mini-latestOpen AI400,000GPT Mini Latest
openai/gpt-5.6-lunaOpen AI1,050,000-
openai/gpt-5.6-luna-proOpen AI1,050,000-
openai/gpt-5.6-terra-proOpen AI1,050,000-
openai/gpt-5.6-terraOpen AI1,050,000-
openai/gpt-5.6-sol-proOpen AI1,050,000-
openai/gpt-5.6-solOpen AI1,050,000-
openai/gpt-chat-latestOpen AI400,000GPT Chat Latest
openai/gpt-5-2025-08-07Open AI400,000GPT-5
openai/gpt-5-mini-2025-08-07Open AI400,000GPT-5 Mini
openai/gpt-5-nano-2025-08-07Open AI400,000GPT-5 Nano
openai/gpt-5-chat-latestOpen AI400,000GPT-5 Chat
openai/gpt-5-1Open AI128,000GPT-5.1
openai/gpt-5-1-chat-latestOpen AI128,000GPT-5.1 Chat Latest
openai/gpt-5-1-codexOpen AI400,000GPT-5.1 Codex
openai/gpt-5-1-codex-miniOpen AI400,000GPT-5.1 Codex Mini
openai/gpt-5-2Open AI400,000GPT-5.2
openai/gpt-5-2-chat-latestOpen AI400,000GPT-5.2 Chat Latest
openai/gpt-5-2-proOpen AI400,000GPT-5.2 Pro
openai/gpt-5-2-codexOpen AI400,000GPT-5.2 Codex
openai/gpt-5-3-codexOpen AI400,000GPT-5.3 Codex
openai/gpt-5-4Open AI1,000,000GPT-5.4
openai/gpt-5-4-proOpen AI1,000,000GPT-5.4 Pro
openai/gpt-5-5Open AI1,000,000GPT-5.5
openai/gpt-5-5-proOpen AI1,000,000GPT 5.5 Pro
anthropic/claude-opus-4.1
claude-opus-4-1
claude-opus-4-1-20250805
Anthropic200,000Claude Opus 4.1

claude-sonnet-4-5-20250929

anthropic/claude-sonnet-4.5

claude-sonnet-4-5

Anthropic200,000Claude 4.5 Sonnet

anthropic/claude-haiku-4.5
claude-haiku-4-5

claude-haiku-4-5-20251001

Anthropic200,000Claude 4.5 Haiku
anthropic/claude-opus-4-5
claude-opus-4-5
claude-opus-4-5-20251101
Anthropic200,000Claude 4.5 Opus
anthropic/claude-opus-4-6Anthropic200,000Claude 4.6 Opus
anthropic/claude-sonnet-4.6
anthropic/claude-sonnet-4-6-20260218
Anthropic200,000Claude Sonnet 4.6
anthropic/claude-opus-4-7
claude-opus-4-7
Anthropic1,000,000Claude Opus 4.7
anthropic/claude-opus-4-8
claude-opus-4-8
Anthropic1,000,000Claude Opus 4.8
anthropic/claude-sonnet-5Anthropic1,000,000-
Qwen/Qwen2.5-7B-Instruct-TurboAlibaba Cloud32,000Qwen 2.5 7B Instruct Turbo
qwen-plusAlibaba Cloud131,000Qwen Plus
qwen-turboAlibaba Cloud1,000,000Qwen Turbo
alibaba/qwen3-32bAlibaba Cloud131,000Qwen3-32B
alibaba/qwen3-coder-480b-a35b-instructAlibaba Cloud262,000Qwen3 Coder
mistral/labs-leanstral-1-5Mistral AI256,000-
baidu/ernie-5.0Baidu128,000-
alibaba/qwen3-235b-a22b-thinking-2507Alibaba Cloud262,000Qwen3 235B A22B Thinking
alibaba/qwen3-next-80b-a3b-instructAlibaba Cloud262,000Qwen3-Next-80B-A3B Instruct
alibaba/qwen3-next-80b-a3b-thinkingAlibaba Cloud262,000Qwen3-Next-80B-A3B Thinking
alibaba/qwen3-max-previewAlibaba Cloud258,000Qwen3-Max Preview
alibaba/qwen3-max-instructAlibaba Cloud262,000Qwen3-Max Instruct
qwen3-omni-30b-a3b-captionerAlibaba Cloud65,000qwen3-omni-30b-a3b-captioner
alibaba/qwen3-vl-32b-instructAlibaba Cloud126,000Qwen3 VL 32B Instruct
alibaba/qwen3-vl-32b-thinkingAlibaba Cloud126,000Qwen3 VL 32B Thinking
alibaba/qwen3.5-plus-20260218Alibaba Cloud1,000,000Qwen3.5 Plus
alibaba/qwen3.5-omni-plusAlibaba Cloud256,000Qwen3.5 Omni Plus
alibaba/qwen3.5-omni-flashAlibaba Cloud256,000Qwen3.5 Omni Flash
alibaba/qwen3.5-flashAlibaba Cloud262,144Coming Soon
alibaba/qwen3.6-27bAlibaba Cloud262,144Qwen 3.6 27B
alibaba/qwen3.6-35b-a3bAlibaba Cloud262,144Qwen3.6-35B-A3B
alibaba/qwen3.6-flashAlibaba Cloud1,000,000Qwen3.5 Flash
alibaba/qwen3.6-plusAlibaba Cloud1,000,000Qwen3.6-Plus
alibaba/qwen3.6-max-previewAlibaba Cloud262,144Qwen3.6 Max Preview
alibaba/qwen3.7-maxAlibaba Cloud1,000,000Qwen3.7 Max
alibaba/qwen3.7-plusAlibaba Cloud1,000,000Qwen3.7 Plus
anthracite-org/magnum-v4-72bAnthracite32,000Magnum v4 72B
baidu/ernie-4.5-vl-424b-a47bBaidu123,000ERNIE 4.5 VL
bytedance/seed-1-8ByteDance256,000Seed 1.8
bytedance/dola-seed-2-0-miniByteDance256,000Dola Seed 2.0 Mini
bytedance/dola-seed-2-0-liteByteDance256,000Dola Seed 2.0 Lite
bytedance/dola-seed-2-0-proByteDance256,000Dola Seed 2.0 Pro
bytedance/dola-seed-2-0-codeByteDance256,000Dola Seed 2.0 Code
cohere/command-aCohere256,000Command A
deepseek-chat or
deepseek/deepseek-chat or
deepseek/deepseek-chat-v3-0324
DeepSeek128,000DeepSeek V3
deepseek/deepseek-r1 or
deepseek-reasoner
DeepSeek128,000DeepSeek R1
deepseek/deepseek-chat-v3.1DeepSeek128,000DeepSeek V3.1 Chat
deepseek/deepseek-reasoner-v3.1DeepSeek128,000DeepSeek V3.1 Reasoner
deepseek/deepseek-thinking-v3.2-expDeepSeek128,000DeepSeek V3.2-Exp Thinking
deepseek/deepseek-non-thinking-v3.2-expDeepSeek128,000DeepSeek V3.2-Exp Non-Thinking
deepseek/deepseek-reasoner-v3.1-terminusDeepSeek128,000DeepSeek V3.1 Terminus Reasoning
deepseek/deepseek-non-reasoner-v3.1-terminusDeepSeek128,000DeepSeek V3.1 Terminus Non-Reasoning
deepseek/deepseek-v4-proDeepSeek1,000,000DeepSeek V4 Pro
deepseek/deepseek-v4-flashDeepSeek1,000,000DeepSeek 4 Flash
google/gemini-2.5-flash-lite-previewGoogle1,000,000
google/gemini-2.5-flashGoogle1,000,000Gemini 2.5 Flash
google/gemini-3-flash-previewGoogle1,000,000Gemini 3 Flash
google/gemini-2.5-proGoogle1,000,000Gemini 2.5 Pro
google/gemma-4-26b-a4b-it-maasGoogle262,144-
google/gemma-3-4b-itGoogle128,000Gemma 3 (4B)
google/gemma-3-12b-itGoogle128,000Gemma 3 (12B)
google/gemma-3-27b-itGoogle128,000Gemma 3 (27B)
google/gemma-3n-e4b-itGoogle8,192Gemma 3n 4B
google/gemini-3-1-pro-previewGoogle1,000,000Gemini 3.1 Pro
google/gemini-3-1-flash-lite-previewGoogle1,048,576Gemini 3.1 Flash Lite
google/gemini-3-1-flash-liteGoogle1,050,000Gemini 3.1 Flash Lite
google/gemma-4-31b-itGoogle262,000Gemma 4 31B
google/gemini-3-5-flashGoogle1,000,000Gemini 3.5 Flash
google/gemini-3-pro-imageGoogle65,536-
google/gemma-2-27b-itGoogle8,192-
google/gemini-3.1-pro-preview-customtoolsGoogle1,048,756-
google/gemini-3.1-flash-imageGoogle131,072-
gryphe/mythomax-l2-13bGryphe4,000MythoMax-L2 (13B)
meta-llama/Llama-3.3-70B-Instruct-TurboMeta128,000Meta Llama 3.3 70B Instruct Turbo
meta-llama/llama-3.3-70b-versatileMeta131,000Llama 3.3 70B Versatile
MiniMax-Text-01MiniMax1,000,000MiniMax-Text-01
minimax/m1MiniMax1,000,000MiniMax M1
minimax/m2MiniMax200,000MiniMax M2
minimax/m2-herMiniMax200,000MiniMax M2-her
minimax/m2-1MiniMax204,800MiniMax M2.1
minimax/m2-1-highspeedMiniMax204,800MiniMax M2.1 Highspeed
minimax/m2-5-20260218MiniMax204,800MiniMax M2.5
minimax/m2-5-highspeed-20260218MiniMax204,800MiniMax M2.5
minimax/m2-7-20260402MiniMax204,800MiniMax M2.7
minimax/m2-7-highspeedMiniMax204,800MiniMax M2.7 Highspeed
minimax/minimax-m3MiniMax1,000,000MiniMax M3
mistralai/mistral-nemoMistral AI128,000Mistral Nemo
moonshot/kimi-k2-5Moonshot262,000Kimi K2.5
moonshot/kimi-k2-6Moonshot256,000Kimi K2.6
moonshot/kimi-k2-7-codeMoonshot262,000Kimi K2.7 Code
moonshot/kimi-k2-7-code-highspeedMoonshot262,144Kimi K2.7 Code Highspeed
meituan/longcat-2.0Meituan1,000,000-
sakana/fugu-ultraSakana AI1,000,000Sakana Fugu Ultra
nousresearch/hermes-4-405bNousResearch131,000Hermes 4 405b
nvidia/nemotron-3-ultra-550b-a55bNVIDIA1,000,000Nemotron 3 Ultra 550b
nvidia/nemotron-3-nano-30b-a3bNVIDIA1,000,000Nemotron 3 Nano 30B
nvidia/nemotron-3-nano-omni-30b-a3b-reasoningNVIDIA1,000,000Nemotron 3 Nano Omni
nvidia/nemotron-3-super-120b-a12bNVIDIA1,000,000Nemotron 3 Super 120B
perplexity/sonarPerplexity128,000Sonar
perplexity/sonar-proPerplexity200,000Sonar Pro
stepfun/step-3.7-flashStepFun256,000Step 3.7 Flash
x-ai/grok-3-betaxAI131,000Grok 3 Beta
x-ai/grok-3-mini-betaxAI131,000Grok 3 Beta Mini
x-ai/grok-code-fast-1xAI256,000Grok Code Fast 1
x-ai/grok-4-fast-non-reasoningxAI2,000,000Grok 4 Fast
x-ai/grok-4-fast-reasoningxAI2,000,000Grok 4 Fast Reasoning
x-ai/grok-4-1-fast-non-reasoningxAI2,000,000Grok 4.1 Fast Non-Reasoning
x-ai/grok-4-1-fast-reasoningxAI2,000,000Grok 4.1 Fast Reasoning
x-ai/grok-4-5X AI500,000-
x-ai/grok-4-20-0309-non-reasoningxAI2,000,000Grok 4.20 Non-Reasoning
x-ai/grok-4-20-0309-reasoningxAI2,000,000Grok 4.20 Reasoning
x-ai/grok-4-3X AI1,000,000-
x-ai/grok-build-0-1xAI256,000Grok Build 0.1
xiaomi/mimo-v2.5Xiaomi1,000,000MiMo V2.5
ai21/jamba-large-1.7AI21256,000-
allenai/olmo-3-32b-thinkAllenAI65,536-
amazon/nova-2-lite-v1Amazon1,000,000-
anthropic/claude-3-haikuAnthropic200,000-
anthropic/claude-sonnet-latestAnthropic1,000,000-
anthropic/claude-opus-latestAnthropic1,000,000-
anthropic/claude-haiku-latestAnthropic1,000,000-
anthropic/claude-fable-latestAnthropic1,000,000-
anthropic/claude-opus-4.8-fastAnthropic1,000,000-
anthropic/claude-sonnet-4Anthropic1,000,000-
z-ai/glm-4.5vZhipu AI65,536-
z-ai/glm-5v-turboZhipu AI202,752-
z-ai/glm-5-turboZhipu AI262,144-
z-ai/glm-4.7-flashZhipu AI202,752-
z-ai/glm-4.6vZhipu AI131,072-
writer/palmyra-x5Writer1,040,000-
upstage/solar-pro-3Upstage128,000-
undi95/remm-slerp-l2-13bundi956,144-
thedrummer/cydonia-24b-v4.1TheDrummer131,072-
thedrummer/rocinante-12bTheDrummer32,768-
thedrummer/unslopnemo-12bTheDrummer32,768-
thedrummer/skyfall-36b-v2TheDrummer32,768-
switchpoint/routerswitchpoint131,072-
openai/gpt-4-turbo-previewOpen AI128,000-
openai/gpt-5.3-chatOpen AI128,000-
openai/gpt-5.2-chatOpen AI128,000-
openai/gpt-5-imageOpen AI400,000-
openai/gpt-5-codexOpen AI400,000-
openai/gpt-5.4-nanoOpen AI400,000-
openai/gpt-5.4-proOpen AI1,050,000-
nvidia/llama-3.3-nemotron-super-49b-v1.5Nvidia131,072-
nousresearch/hermes-3-llama-3.1-405bNousResearch131,072-
nousresearch/hermes-3-llama-3.1-70bNousResearch131,072-
nousresearch/hermes-4-70bNousResearch131,072-
nex-agi/nex-n2-miniNex AGI262,144-
nex-agi/nex-n2-proNex AGI262,144-
morph/morph-v3-fastMorph81,920-
morph/morph-v3-largeMorph262,144-
moonshotai/kimi-k2Moonshot131,072-
moonshotai/kimi-k2-thinkingMoonshot262,144-
moonshotai/kimi-k2-0905Moonshot262,144-
mistralai/codestral-2508Mistral AI256,000-
mistralai/mistral-sabaMistral AI32,768-
mistralai/voxtral-small-24b-2507Mistral AI32,000-
mistralai/mixtral-8x22b-instructMistral AI65,536-
mistralai/mistral-small-3.2-24b-instructMistral AI128,000-
mistralai/mistral-small-3.1-24b-instructMistral AI128,000-
mistralai/mistral-small-2603Mistral AI262,144-
mistralai/mistral-small-24b-instruct-2501Mistral AI32,768-
mistralai/mistral-medium-3.1Mistral AI131,072-
mistralai/ministral-8b-2512Mistral AI262,144-
mistralai/ministral-3b-2512Mistral AI131,072-
mistralai/ministral-14b-2512Mistral AI262,144-
mistralai/devstral-2512Mistral AI262,144-
mancer/weaverMancer8,000-
liquid/lfm-2-24b-a2bLiquidAI128,000-
kwaipilot/kat-coder-pro-v2Kwaipilot256,000-
inflection/inflection-3-piInflection8,000-
inflection/inflection-3-productivityInflection8,000-
inclusionai/ling-2.6-1tinclusionAI262,144-
inclusionai/ring-2.6-1tinclusionAI262,144-
inclusionai/ling-2.6-flashinclusionAI262,144-
inception/mercury-2Inception128,000-
ibm-granite/granite-4.0-h-microIBM131,000-
ibm-granite/granite-4.1-8bIBM131,072-
cohere/command-r-08-2024Cohere128,000-
bytedance-seed/seed-1.6ByteDance Seed262,144-
bytedance-seed/seed-2.0-liteByteDance Seed262,144-
bytedance-seed/seed-2.0-miniByteDance Seed262,144-
bytedance-seed/seed-1.6-flashByteDance Seed262,144-
arcee-ai/coder-largeArcee AI32,768-
arcee-ai/trinity-large-thinkingArcee AI262,144-
arcee-ai/virtuoso-largeArcee AI131,072-
arcee-ai/trinity-miniArcee AI131,072-
amazon/nova-pro-v1Amazon300,000-
amazon/nova-premier-v1Amazon1,000,000-
amazon/nova-micro-v1Amazon128,000-
amazon/nova-lite-v1Amazon300,000-
aion-labs/aion-rp-llama-3.1-8bAionLabs32,768-
aion-labs/aion-2.0AionLabs131,072-
xiaomi/mimo-v2.5-proXiaomi1,000,000MiMo V2.5 Pro
zhipu/glm-4.5-airZhipu128,000GLM-4.5 Air
zhipu/glm-4.5Zhipu128,000GLM-4.5
zhipu/glm-4.6Zhipu200,000GLM-4.6
zhipu/glm-4.7Zhipu200,000GLM-4.7
zhipu/glm-5Zhipu200,000GLM-5
zhipu/glm-5-1Zhipu200,000GLM-5.1
zhipu/glm-5-2Zhipu200,000GLM-5.2
+
Model ID + API Reference linkDeveloperContextModel Card
gpt-3.5-turboOpen AI16,000Chat GPT 3.5 Turbo
gpt-3.5-turbo-0125Open AI16,000Chat GPT-3.5 Turbo 0125
gpt-3.5-turbo-1106Open AI16,000Chat GPT-3.5 Turbo 1106
gpt-4o-2024-08-06Open AI128,000GPT-4o-2024-08-06
gpt-4o-2024-05-13Open AI128,000GPT-4o-2024-05-13
gpt-4o-miniOpen AI128,000Chat GPT 4o mini
gpt-4o-mini-2024-07-18Open AI128,000GPT 4o mini
gpt-4o-search-previewOpen AI128,000GPT-4o Search Preview
gpt-4o-mini-search-previewOpen AI128,000GPT-4o Mini Search Preview
o1Open AI200,000OpenAI o1
openai/o3-2025-04-16Open AI200,000o3
o3-miniOpen AI200,000OpenAI o3 mini
openai/o3-proOpen AI200,000o3-pro
openai/gpt-4.1-2025-04-14Open AI1,000,000GPT-4.1
openai/gpt-4.1-mini-2025-04-14Open AI1,000,000GPT-4.1 Mini
openai/gpt-4.1-nano-2025-04-14Open AI1,000,000GPT-4.1 Nano
openai/o4-mini-2025-04-16Open AI200,000GPT-o4-mini-2025-04-16
openai/gpt-oss-20bOpen AI128,000GPT OSS 20B
tencent/hy3Tencent262,144-
openai/gpt-oss-120bOpen AI128,000GPT OSS 120B
openai/gpt-latestOpen AI400,000GPT Latest
openai/gpt-mini-latestOpen AI400,000GPT Mini Latest
openai/gpt-5.6-lunaOpen AI1,050,000-
openai/gpt-5.6-luna-proOpen AI1,050,000-
openai/gpt-5.6-terra-proOpen AI1,050,000-
openai/gpt-5.6-terraOpen AI1,050,000-
openai/gpt-5.6-sol-proOpen AI1,050,000-
openai/gpt-5.6-solOpen AI1,050,000-
openai/gpt-chat-latestOpen AI400,000GPT Chat Latest
openai/gpt-5-2025-08-07Open AI400,000GPT-5
openai/gpt-5-mini-2025-08-07Open AI400,000GPT-5 Mini
openai/gpt-5-nano-2025-08-07Open AI400,000GPT-5 Nano
openai/gpt-5-chat-latestOpen AI400,000GPT-5 Chat
openai/gpt-5-1Open AI128,000GPT-5.1
openai/gpt-5-1-chat-latestOpen AI128,000GPT-5.1 Chat Latest
openai/gpt-5-1-codexOpen AI400,000GPT-5.1 Codex
openai/gpt-5-1-codex-miniOpen AI400,000GPT-5.1 Codex Mini
openai/gpt-5-2Open AI400,000GPT-5.2
openai/gpt-5-2-chat-latestOpen AI400,000GPT-5.2 Chat Latest
openai/gpt-5-2-proOpen AI400,000GPT-5.2 Pro
openai/gpt-5-2-codexOpen AI400,000GPT-5.2 Codex
openai/gpt-5-3-codexOpen AI400,000GPT-5.3 Codex
openai/gpt-5-4Open AI1,000,000GPT-5.4
openai/gpt-5-4-proOpen AI1,000,000GPT-5.4 Pro
openai/gpt-5-5Open AI1,000,000GPT-5.5
openai/gpt-5-5-proOpen AI1,000,000GPT 5.5 Pro
anthropic/claude-opus-4.1
claude-opus-4-1
claude-opus-4-1-20250805
Anthropic200,000Claude Opus 4.1

claude-sonnet-4-5-20250929

anthropic/claude-sonnet-4.5

claude-sonnet-4-5

Anthropic200,000Claude 4.5 Sonnet

anthropic/claude-haiku-4.5
claude-haiku-4-5

claude-haiku-4-5-20251001

Anthropic200,000Claude 4.5 Haiku
anthropic/claude-opus-4-5
claude-opus-4-5
claude-opus-4-5-20251101
Anthropic200,000Claude 4.5 Opus
anthropic/claude-opus-4-6Anthropic200,000Claude 4.6 Opus
anthropic/claude-sonnet-4.6
anthropic/claude-sonnet-4-6-20260218
Anthropic200,000Claude Sonnet 4.6
anthropic/claude-opus-4-7
claude-opus-4-7
Anthropic1,000,000Claude Opus 4.7
anthropic/claude-opus-4-8
claude-opus-4-8
Anthropic1,000,000Claude Opus 4.8
anthropic/claude-sonnet-5Anthropic1,000,000-
Qwen/Qwen2.5-7B-Instruct-TurboAlibaba Cloud32,000Qwen 2.5 7B Instruct Turbo
qwen-plusAlibaba Cloud131,000Qwen Plus
qwen-turboAlibaba Cloud1,000,000Qwen Turbo
alibaba/qwen3-32bAlibaba Cloud131,000Qwen3-32B
alibaba/qwen3-coder-480b-a35b-instructAlibaba Cloud262,000Qwen3 Coder
mistral/labs-leanstral-1-5Mistral AI256,000-
baidu/ernie-5.0Baidu128,000-
alibaba/glm-5.2Zhipu AI1,000,000-
alibaba/qwen3-235b-a22b-thinking-2507Alibaba Cloud262,000Qwen3 235B A22B Thinking
alibaba/qwen3-next-80b-a3b-instructAlibaba Cloud262,000Qwen3-Next-80B-A3B Instruct
alibaba/qwen3-next-80b-a3b-thinkingAlibaba Cloud262,000Qwen3-Next-80B-A3B Thinking
alibaba/qwen3-max-previewAlibaba Cloud258,000Qwen3-Max Preview
alibaba/qwen3-max-instructAlibaba Cloud262,000Qwen3-Max Instruct
qwen3-omni-30b-a3b-captionerAlibaba Cloud65,000qwen3-omni-30b-a3b-captioner
alibaba/qwen3-vl-32b-instructAlibaba Cloud126,000Qwen3 VL 32B Instruct
alibaba/qwen3-vl-32b-thinkingAlibaba Cloud126,000Qwen3 VL 32B Thinking
alibaba/qwen3.5-plus-20260218Alibaba Cloud1,000,000Qwen3.5 Plus
alibaba/qwen3.5-omni-plusAlibaba Cloud256,000Qwen3.5 Omni Plus
alibaba/qwen3.5-omni-flashAlibaba Cloud256,000Qwen3.5 Omni Flash
alibaba/qwen3.5-flashAlibaba Cloud262,144Coming Soon
alibaba/qwen3.6-27bAlibaba Cloud262,144Qwen 3.6 27B
alibaba/qwen3.6-35b-a3bAlibaba Cloud262,144Qwen3.6-35B-A3B
alibaba/qwen3.6-flashAlibaba Cloud1,000,000Qwen3.5 Flash
alibaba/qwen3.6-plusAlibaba Cloud1,000,000Qwen3.6-Plus
alibaba/qwen3.6-max-previewAlibaba Cloud262,144Qwen3.6 Max Preview
alibaba/qwen3.7-maxAlibaba Cloud1,000,000Qwen3.7 Max
alibaba/qwen3.7-plusAlibaba Cloud1,000,000Qwen3.7 Plus
anthracite-org/magnum-v4-72bAnthracite32,000Magnum v4 72B
baidu/ernie-4.5-vl-424b-a47bBaidu123,000ERNIE 4.5 VL
bytedance/seed-1-8ByteDance256,000Seed 1.8
bytedance/dola-seed-2-0-miniByteDance256,000Dola Seed 2.0 Mini
bytedance/dola-seed-2-0-liteByteDance256,000Dola Seed 2.0 Lite
bytedance/dola-seed-2-0-proByteDance256,000Dola Seed 2.0 Pro
bytedance/dola-seed-2-0-codeByteDance256,000Dola Seed 2.0 Code
cohere/command-aCohere256,000Command A
deepseek-chat or
deepseek/deepseek-chat or
deepseek/deepseek-chat-v3-0324
DeepSeek128,000DeepSeek V3
deepseek/deepseek-r1 or
deepseek-reasoner
DeepSeek128,000DeepSeek R1
deepseek/deepseek-chat-v3.1DeepSeek128,000DeepSeek V3.1 Chat
deepseek/deepseek-reasoner-v3.1DeepSeek128,000DeepSeek V3.1 Reasoner
deepseek/deepseek-thinking-v3.2-expDeepSeek128,000DeepSeek V3.2-Exp Thinking
deepseek/deepseek-non-thinking-v3.2-expDeepSeek128,000DeepSeek V3.2-Exp Non-Thinking
deepseek/deepseek-reasoner-v3.1-terminusDeepSeek128,000DeepSeek V3.1 Terminus Reasoning
deepseek/deepseek-non-reasoner-v3.1-terminusDeepSeek128,000DeepSeek V3.1 Terminus Non-Reasoning
deepseek/deepseek-v4-proDeepSeek1,000,000DeepSeek V4 Pro
deepseek/deepseek-v4-flashDeepSeek1,000,000DeepSeek 4 Flash
google/gemini-2.5-flash-lite-previewGoogle1,000,000
google/gemini-2.5-flashGoogle1,000,000Gemini 2.5 Flash
google/gemini-3-flash-previewGoogle1,000,000Gemini 3 Flash
google/gemini-2.5-proGoogle1,000,000Gemini 2.5 Pro
google/gemma-4-26b-a4b-it-maasGoogle262,144-
google/gemma-3-4b-itGoogle128,000Gemma 3 (4B)
google/gemma-3-12b-itGoogle128,000Gemma 3 (12B)
google/gemma-3-27b-itGoogle128,000Gemma 3 (27B)
google/gemma-3n-e4b-itGoogle8,192Gemma 3n 4B
google/gemini-3-1-pro-previewGoogle1,000,000Gemini 3.1 Pro
google/gemini-3-1-flash-lite-previewGoogle1,048,576Gemini 3.1 Flash Lite
google/gemini-3-1-flash-liteGoogle1,050,000Gemini 3.1 Flash Lite
google/gemma-4-31b-itGoogle262,000Gemma 4 31B
google/gemini-3-5-flashGoogle1,000,000Gemini 3.5 Flash
google/gemini-3-pro-imageGoogle65,536-
google/gemma-2-27b-itGoogle8,192-
google/gemini-3.1-pro-preview-customtoolsGoogle1,048,756-
google/gemini-3.1-flash-imageGoogle131,072-
gryphe/mythomax-l2-13bGryphe4,000MythoMax-L2 (13B)
meta-llama/Llama-3.3-70B-Instruct-TurboMeta128,000Meta Llama 3.3 70B Instruct Turbo
meta-llama/llama-3.3-70b-versatileMeta131,000Llama 3.3 70B Versatile
MiniMax-Text-01MiniMax1,000,000MiniMax-Text-01
minimax/m1MiniMax1,000,000MiniMax M1
minimax/m2MiniMax200,000MiniMax M2
minimax/m2-herMiniMax200,000MiniMax M2-her
minimax/m2-1MiniMax204,800MiniMax M2.1
minimax/m2-1-highspeedMiniMax204,800MiniMax M2.1 Highspeed
minimax/m2-5-20260218MiniMax204,800MiniMax M2.5
minimax/m2-5-highspeed-20260218MiniMax204,800MiniMax M2.5
minimax/m2-7-20260402MiniMax204,800MiniMax M2.7
minimax/m2-7-highspeedMiniMax204,800MiniMax M2.7 Highspeed
minimax/minimax-m3MiniMax1,000,000MiniMax M3
mistralai/mistral-nemoMistral AI128,000Mistral Nemo
moonshot/kimi-k2-5Moonshot262,000Kimi K2.5
moonshot/kimi-k2-6Moonshot256,000Kimi K2.6
moonshot/kimi-k2-7-codeMoonshot262,000Kimi K2.7 Code
moonshot/kimi-k2-7-code-highspeedMoonshot262,144Kimi K2.7 Code Highspeed
meituan/longcat-2.0Meituan1,000,000-
sakana/fugu-ultraSakana AI1,000,000Sakana Fugu Ultra
nousresearch/hermes-4-405bNousResearch131,000Hermes 4 405b
nvidia/nemotron-3-ultra-550b-a55bNVIDIA1,000,000Nemotron 3 Ultra 550b
nvidia/nemotron-3-nano-30b-a3bNVIDIA1,000,000Nemotron 3 Nano 30B
nvidia/nemotron-3-nano-omni-30b-a3b-reasoningNVIDIA1,000,000Nemotron 3 Nano Omni
nvidia/nemotron-3-super-120b-a12bNVIDIA1,000,000Nemotron 3 Super 120B
perplexity/sonarPerplexity128,000Sonar
perplexity/sonar-proPerplexity200,000Sonar Pro
stepfun/step-3.7-flashStepFun256,000Step 3.7 Flash
x-ai/grok-3-betaxAI131,000Grok 3 Beta
x-ai/grok-3-mini-betaxAI131,000Grok 3 Beta Mini
x-ai/grok-code-fast-1xAI256,000Grok Code Fast 1
x-ai/grok-4-fast-non-reasoningxAI2,000,000Grok 4 Fast
x-ai/grok-4-fast-reasoningxAI2,000,000Grok 4 Fast Reasoning
x-ai/grok-4-1-fast-non-reasoningxAI2,000,000Grok 4.1 Fast Non-Reasoning
x-ai/grok-4-1-fast-reasoningxAI2,000,000Grok 4.1 Fast Reasoning
x-ai/grok-4-5X AI500,000-
x-ai/grok-4-20-0309-non-reasoningxAI2,000,000Grok 4.20 Non-Reasoning
x-ai/grok-4-20-0309-reasoningxAI2,000,000Grok 4.20 Reasoning
x-ai/grok-4-3X AI1,000,000-
x-ai/grok-build-0-1xAI256,000Grok Build 0.1
xiaomi/mimo-v2.5Xiaomi1,000,000MiMo V2.5
ai21/jamba-large-1.7AI21256,000-
allenai/olmo-3-32b-thinkAllenAI65,536-
amazon/nova-2-lite-v1Amazon1,000,000-
anthropic/claude-3-haikuAnthropic200,000-
anthropic/claude-sonnet-latestAnthropic1,000,000-
anthropic/claude-opus-latestAnthropic1,000,000-
anthropic/claude-haiku-latestAnthropic1,000,000-
anthropic/claude-fable-latestAnthropic1,000,000-
anthropic/claude-opus-4.8-fastAnthropic1,000,000-
anthropic/claude-sonnet-4Anthropic1,000,000-
z-ai/glm-4.5vZhipu AI65,536-
z-ai/glm-5v-turboZhipu AI202,752-
z-ai/glm-5-turboZhipu AI262,144-
z-ai/glm-4.7-flashZhipu AI202,752-
z-ai/glm-4.6vZhipu AI131,072-
writer/palmyra-x5Writer1,040,000-
upstage/solar-pro-3Upstage128,000-
undi95/remm-slerp-l2-13bundi956,144-
thedrummer/cydonia-24b-v4.1TheDrummer131,072-
thedrummer/rocinante-12bTheDrummer32,768-
thedrummer/unslopnemo-12bTheDrummer32,768-
thedrummer/skyfall-36b-v2TheDrummer32,768-
switchpoint/routerswitchpoint131,072-
openai/gpt-4-turbo-previewOpen AI128,000-
openai/gpt-5.3-chatOpen AI128,000-
openai/gpt-5.2-chatOpen AI128,000-
openai/gpt-5-imageOpen AI400,000-
openai/gpt-5-codexOpen AI400,000-
openai/gpt-5.4-nanoOpen AI400,000-
openai/gpt-5.4-proOpen AI1,050,000-
nvidia/llama-3.3-nemotron-super-49b-v1.5Nvidia131,072-
nousresearch/hermes-3-llama-3.1-405bNousResearch131,072-
nousresearch/hermes-3-llama-3.1-70bNousResearch131,072-
nousresearch/hermes-4-70bNousResearch131,072-
nex-agi/nex-n2-miniNex AGI262,144-
nex-agi/nex-n2-proNex AGI262,144-
morph/morph-v3-fastMorph81,920-
morph/morph-v3-largeMorph262,144-
moonshotai/kimi-k2Moonshot131,072-
moonshotai/kimi-k2-thinkingMoonshot262,144-
moonshotai/kimi-k2-0905Moonshot262,144-
mistralai/codestral-2508Mistral AI256,000-
mistralai/mistral-sabaMistral AI32,768-
mistralai/voxtral-small-24b-2507Mistral AI32,000-
mistralai/mixtral-8x22b-instructMistral AI65,536-
mistralai/mistral-small-3.2-24b-instructMistral AI128,000-
mistralai/mistral-small-3.1-24b-instructMistral AI128,000-
mistralai/mistral-small-2603Mistral AI262,144-
mistralai/mistral-small-24b-instruct-2501Mistral AI32,768-
mistralai/mistral-medium-3.1Mistral AI131,072-
mistralai/ministral-8b-2512Mistral AI262,144-
mistralai/ministral-3b-2512Mistral AI131,072-
mistralai/ministral-14b-2512Mistral AI262,144-
mistralai/devstral-2512Mistral AI262,144-
mancer/weaverMancer8,000-
liquid/lfm-2-24b-a2bLiquidAI128,000-
kwaipilot/kat-coder-pro-v2Kwaipilot256,000-
inflection/inflection-3-piInflection8,000-
inflection/inflection-3-productivityInflection8,000-
inclusionai/ling-2.6-1tinclusionAI262,144-
inclusionai/ring-2.6-1tinclusionAI262,144-
inclusionai/ling-2.6-flashinclusionAI262,144-
inception/mercury-2Inception128,000-
ibm-granite/granite-4.0-h-microIBM131,000-
ibm-granite/granite-4.1-8bIBM131,072-
cohere/command-r-08-2024Cohere128,000-
bytedance-seed/seed-1.6ByteDance Seed262,144-
bytedance-seed/seed-2.0-liteByteDance Seed262,144-
bytedance-seed/seed-2.0-miniByteDance Seed262,144-
bytedance-seed/seed-1.6-flashByteDance Seed262,144-
arcee-ai/coder-largeArcee AI32,768-
arcee-ai/trinity-large-thinkingArcee AI262,144-
arcee-ai/virtuoso-largeArcee AI131,072-
arcee-ai/trinity-miniArcee AI131,072-
amazon/nova-pro-v1Amazon300,000-
amazon/nova-premier-v1Amazon1,000,000-
amazon/nova-micro-v1Amazon128,000-
amazon/nova-lite-v1Amazon300,000-
aion-labs/aion-rp-llama-3.1-8bAionLabs32,768-
aion-labs/aion-2.0AionLabs131,072-
xiaomi/mimo-v2.5-proXiaomi1,000,000MiMo V2.5 Pro
zhipu/glm-4.5-airZhipu128,000GLM-4.5 Air
zhipu/glm-4.5Zhipu128,000GLM-4.5
zhipu/glm-4.6Zhipu200,000GLM-4.6
zhipu/glm-4.7Zhipu200,000GLM-4.7
zhipu/glm-5Zhipu200,000GLM-5
zhipu/glm-5-1Zhipu200,000GLM-5.1
zhipu/glm-5-2Zhipu200,000GLM-5.2
## Image Models diff --git a/docs/api-references/text-models-llm/Zhipu-AI/README.md b/docs/api-references/text-models-llm/Zhipu-AI/README.md new file mode 100644 index 00000000..19e9d6f1 --- /dev/null +++ b/docs/api-references/text-models-llm/Zhipu-AI/README.md @@ -0,0 +1,2 @@ +# Zhipu AI + diff --git a/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.json b/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.json new file mode 100644 index 00000000..83c3feb4 --- /dev/null +++ b/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.json @@ -0,0 +1,1894 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "AIML API", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://api.aimlapi.com" + } + ], + "paths": { + "/v1/chat/completions": { + "post": { + "operationId": "_v1_chat_completions", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "model": { + "type": "string", + "enum": [ + "alibaba/glm-5.2" + ] + }, + "provider": { + "type": "string", + "description": "Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive.", + "example": "auto" + }, + "messages": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "user" + ], + "description": "The role of the author of the message — in this case, the user" + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of the content part." + }, + "text": { + "type": "string", + "description": "The text content." + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "text" + ] + } + } + ], + "description": "The contents of the user message." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of the content part." + }, + "text": { + "type": "string", + "description": "The text content." + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "text" + ] + } + } + ], + "description": "The contents of the developer message." + }, + "role": { + "type": "string", + "enum": [ + "developer" + ], + "description": "The role of the author of the message — in this case, the developer." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "content", + "role" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "system" + ], + "description": "The role of the author of the message — in this case, the system." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of the content part." + }, + "text": { + "type": "string", + "description": "The text content." + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "text" + ] + } + } + ], + "description": "The contents of the system message." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "role", + "content" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "tool" + ], + "description": "The role of the author of the message — in this case, the tool." + }, + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of the content part." + }, + "text": { + "type": "string", + "description": "The text content." + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "text" + ] + } + } + ], + "description": "The contents of the tool message." + }, + "tool_call_id": { + "type": "string", + "description": "Tool call that this message is responding to." + }, + "name": { + "type": "string", + "nullable": true, + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "role", + "content", + "tool_call_id" + ] + }, + { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the author of the message — in this case, the Assistant." + }, + "content": { + "anyOf": [ + { + "type": "string", + "description": "The contents of the Assistant message." + }, + { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of the content part." + }, + "text": { + "type": "string", + "description": "The text content." + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "text" + ] + }, + "description": "An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal." + }, + { + "nullable": true + } + ], + "description": "The contents of the Assistant message. Required unless tool_calls or function_call is specified." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + }, + "tool_calls": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + }, + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + } + }, + "required": [ + "name", + "arguments" + ], + "description": "The function that the model called." + }, + "extra_content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn." + } + }, + "required": [ + "id", + "type", + "function" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "custom": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the custom tool to call." + }, + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + } + }, + "required": [ + "name", + "input" + ], + "description": "The custom tool that the model called." + }, + "extra_content": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn." + } + }, + "required": [ + "id", + "type", + "custom" + ] + } + ] + }, + "description": "The tool calls generated by the model, such as function calls." + }, + "refusal": { + "type": "string", + "nullable": true, + "description": "The refusal message by the Assistant." + } + }, + "required": [ + "role" + ] + } + ] + }, + "description": "A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio." + }, + "max_completion_tokens": { + "type": "integer", + "minimum": 1, + "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens." + }, + "max_tokens": { + "type": "number", + "minimum": 1, + "description": "The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API." + }, + "stream": { + "type": "boolean", + "default": false, + "description": "If set to True, the model response data will be streamed to the client as it is generated using server-sent events." + }, + "stream_options": { + "type": "object", + "properties": { + "include_usage": { + "type": "boolean" + } + }, + "required": [ + "include_usage" + ] + }, + "tools": { + "type": "array", + "items": { + "anyOf": [ + { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "function": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "name": { + "type": "string", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "parameters": { + "type": "object", + "additionalProperties": { + "nullable": true, + "description": "The parameters the functions accepts, described as a JSON Schema object." + } + }, + "strict": { + "type": "boolean", + "nullable": true, + "description": "Whether to enable strict schema adherence when generating the function call. If set to True, the model will follow the exact schema defined in the parameters field. Only a subset of JSON Schema is supported when strict is True." + } + }, + "required": [ + "name" + ] + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "function" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "custom": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the custom tool, used to identify it in tool calls." + }, + "description": { + "type": "string", + "description": "Optional description of the custom tool, used to provide more context." + }, + "format": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ] + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "grammar" + ] + }, + "grammar": { + "type": "object", + "properties": { + "definition": { + "type": "string", + "description": "The grammar definition." + }, + "syntax": { + "type": "string", + "enum": [ + "lark", + "regex" + ], + "description": "The syntax of the grammar definition." + } + }, + "required": [ + "definition", + "syntax" + ] + } + }, + "required": [ + "type", + "grammar" + ] + } + ], + "description": "The input format for the custom tool. Default is unconstrained text." + } + }, + "required": [ + "name", + "format" + ] + }, + "cache_control": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ephemeral" + ] + }, + "ttl": { + "type": "string", + "enum": [ + "5m", + "1h" + ] + } + }, + "required": [ + "type" + ] + } + }, + "required": [ + "type", + "custom" + ] + } + ] + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "type" + ] + } + ] + }, + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported." + }, + "tool_choice": { + "anyOf": [ + { + "type": "string", + "enum": [ + "none", + "auto", + "required" + ], + "description": "none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type", + "function" + ], + "description": "Specifies a tool the model should use. Use to force the model to call a specific function." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "allowed_tools" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "allowed_tools": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "enum": [ + "auto", + "required" + ], + "description": "Constrains the tools available to the model to a pre-defined set.\n- auto allows the model to pick from among the allowed tools and generate a message.\n- required requires the model to call one or more of the allowed tools." + }, + "tools": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "nullable": true + } + }, + "description": "A list of tool definitions that the model should be allowed to call." + } + }, + "required": [ + "mode", + "tools" + ] + } + }, + "required": [ + "type", + "allowed_tools" + ], + "description": "Constrains the tools available to the model to a pre-defined set." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "function": { + "type": "string", + "enum": [ + "name" + ], + "description": "The name of the function to call." + } + }, + "required": [ + "type", + "function" + ], + "description": "Specifies a tool the model should use. Use to force the model to call a specific function." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "The type of the tool. Currently, only function is supported." + }, + "custom": { + "type": "string", + "enum": [ + "name" + ], + "description": "The name of the custom tool to call." + } + }, + "required": [ + "type", + "custom" + ], + "description": "Specifies a tool the model should use. Use to force the model to call a specific custom tool." + } + ], + "description": "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." + }, + "normalize_tool_schemas": { + "type": "boolean", + "description": "Enable provider compatibility normalization for tool function JSON schemas." + }, + "parallel_tool_calls": { + "type": "boolean", + "description": "Whether to enable parallel function calling during tool use." + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2, + "description": "What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both." + }, + "top_p": { + "type": "number", + "minimum": 0.01, + "maximum": 1, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." + }, + "stop": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "nullable": true + } + ], + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence." + }, + "response_format": { + "oneOf": [ + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of response format being defined. Always text." + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "Default response format. Used to generate text responses." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "json_object" + ], + "description": "The type of response format being defined. Always json_object." + } + }, + "required": [ + "type" + ], + "additionalProperties": false, + "description": "An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so." + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "json_schema" + ], + "description": "The type of response format being defined. Always json_schema." + }, + "json_schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "schema": { + "type": "object", + "additionalProperties": { + "nullable": true + }, + "description": "The schema for the response format, described as a JSON Schema object." + }, + "strict": { + "type": "boolean", + "nullable": true, + "description": "Whether to enable strict schema adherence when generating the output. If set to True, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is True." + }, + "description": { + "type": "string", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format." + } + }, + "required": [ + "name" + ], + "additionalProperties": false, + "description": "JSON Schema response format. Used to generate structured JSON responses." + } + }, + "required": [ + "type", + "json_schema" + ], + "additionalProperties": false, + "description": "JSON Schema response format. Used to generate structured JSON responses." + } + ], + "description": "An object specifying the format that the model must output." + }, + "enable_thinking": { + "type": "boolean", + "default": false, + "description": "Specifies whether to use the thinking mode." + }, + "thinking_budget": { + "type": "integer", + "minimum": 1, + "description": "The maximum reasoning length, effective only when enable_thinking is set to true." + } + }, + "required": [ + "model", + "messages" + ], + "title": "alibaba/glm-5.2" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the chat completion.", + "example": "chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMl" + }, + "object": { + "type": "string", + "enum": [ + "chat.completion" + ], + "description": "The object type.", + "example": "chat.completion" + }, + "created": { + "type": "number", + "description": "The Unix timestamp (in seconds) of when the chat completion was created.", + "example": 1762343744 + }, + "choices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "index": { + "type": "number", + "description": "The index of the choice in the list of choices.", + "example": 0 + }, + "message": { + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "The role of the author of this message.", + "example": "assistant" + }, + "content": { + "type": "string", + "description": "The contents of the message.", + "example": "Hello! I'm just a program, so I don't have feelings, but I'm here and ready to help you. How can I assist you today?" + }, + "refusal": { + "type": "string", + "nullable": true, + "description": "The refusal message generated by the model.", + "example": null + }, + "annotations": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "url_citation" + ], + "description": "The type of the URL citation. Always url_citation." + }, + "url_citation": { + "type": "object", + "properties": { + "end_index": { + "type": "integer", + "description": "The index of the last character of the URL citation in the message." + }, + "start_index": { + "type": "integer", + "description": "The index of the first character of the URL citation in the message." + }, + "title": { + "type": "string", + "description": "The title of the web resource." + }, + "url": { + "type": "string", + "description": "The URL of the web resource." + } + }, + "required": [ + "end_index", + "start_index", + "title", + "url" + ], + "description": "A URL citation when using web search." + } + }, + "required": [ + "type", + "url_citation" + ] + }, + "description": "Annotations for the message, when applicable, as when using the web search tool.", + "example": null + }, + "audio": { + "type": "object", + "nullable": true, + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this audio response." + }, + "data": { + "type": "string", + "description": "Base64 encoded audio bytes generated by the model, in the format specified in the request." + }, + "transcript": { + "type": "string", + "description": "Transcript of the audio generated by the model." + }, + "expires_at": { + "type": "integer", + "description": "The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations." + } + }, + "required": [ + "id", + "data", + "transcript", + "expires_at" + ], + "description": "A chat completion message generated by the model.", + "example": null + }, + "tool_calls": { + "type": "array", + "nullable": true, + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool." + }, + "function": { + "type": "object", + "properties": { + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + }, + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "arguments", + "name" + ], + "description": "The function that the model called." + } + }, + "required": [ + "id", + "type", + "function" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "enum": [ + "custom" + ], + "description": "The type of the tool." + }, + "custom": { + "type": "object", + "properties": { + "input": { + "type": "string", + "description": "The input for the custom tool call generated by the model." + }, + "name": { + "type": "string", + "description": "The name of the custom tool to call." + } + }, + "required": [ + "input", + "name" + ], + "description": "The custom tool that the model called." + } + }, + "required": [ + "id", + "type", + "custom" + ] + } + ] + }, + "description": "The tool calls generated by the model, such as function calls.", + "example": null + } + }, + "required": [ + "role", + "content" + ], + "description": "A chat completion message generated by the model." + }, + "finish_reason": { + "type": "string", + "enum": [ + "stop", + "length", + "content_filter", + "tool_calls" + ], + "description": "The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool" + }, + "logprobs": { + "type": "object", + "nullable": true, + "properties": { + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + }, + "token": { + "type": "string", + "description": "The token." + }, + "top_logprobs": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "nullable": true, + "items": { + "type": "integer" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + }, + "token": { + "type": "string", + "description": "The token." + } + }, + "required": [ + "logprob", + "token" + ] + }, + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned." + } + }, + "required": [ + "bytes", + "logprob", + "token" + ] + }, + "description": "A list of message content tokens with log probability information." + }, + "refusal": { + "type": "array", + "items": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + }, + "token": { + "type": "string", + "description": "The token." + }, + "top_logprobs": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "bytes": { + "type": "array", + "nullable": true, + "items": { + "type": "integer" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + }, + "token": { + "type": "string", + "description": "The token." + } + }, + "required": [ + "logprob", + "token" + ] + }, + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned." + } + }, + "required": [ + "bytes", + "logprob", + "token" + ] + }, + "description": "A list of message refusal tokens with log probability information." + } + }, + "required": [ + "content", + "refusal" + ], + "description": "Log probability information for the choice.", + "example": null + } + }, + "required": [ + "index", + "message", + "finish_reason" + ] + } + }, + "model": { + "type": "string", + "description": "The model used for the chat completion.", + "example": "alibaba/glm-5.2" + }, + "usage": { + "type": "object", + "properties": { + "prompt_tokens": { + "type": "number", + "description": "Number of tokens in the prompt.", + "example": 137 + }, + "completion_tokens": { + "type": "number", + "description": "Number of tokens in the generated completion.", + "example": 914 + }, + "total_tokens": { + "type": "number", + "description": "Total number of tokens used in the request (prompt + completion).", + "example": 1051 + }, + "completion_tokens_details": { + "type": "object", + "nullable": true, + "properties": { + "accepted_prediction_tokens": { + "type": "integer", + "nullable": true, + "description": "When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion." + }, + "audio_tokens": { + "type": "integer", + "nullable": true, + "description": "Audio input tokens generated by the model." + }, + "reasoning_tokens": { + "type": "integer", + "nullable": true, + "description": "Tokens generated by the model for reasoning." + }, + "rejected_prediction_tokens": { + "type": "integer", + "nullable": true, + "description": "When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits." + } + }, + "description": "Breakdown of tokens used in a completion.", + "example": null + }, + "prompt_tokens_details": { + "type": "object", + "nullable": true, + "properties": { + "audio_tokens": { + "type": "integer", + "nullable": true, + "description": "Audio input tokens present in the prompt." + }, + "cached_tokens": { + "type": "integer", + "nullable": true, + "description": "Cached tokens present in the prompt." + } + }, + "description": "Breakdown of tokens used in the prompt.", + "example": null + } + }, + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ], + "description": "Usage statistics for the completion request." + }, + "meta": { + "type": "object", + "nullable": true, + "properties": { + "usage": { + "type": "object", + "nullable": true, + "properties": { + "credits_used": { + "type": "number", + "description": "The number of tokens consumed during generation.", + "example": 120000 + }, + "usd_spent": { + "type": "number", + "description": "The total amount of money spent by the user in USD.", + "example": 0.06 + } + }, + "required": [ + "credits_used", + "usd_spent" + ] + } + }, + "description": "Additional details about the generation." + } + }, + "required": [ + "id", + "object", + "created", + "choices", + "model", + "usage" + ] + } + }, + "text/event-stream": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the chat completion." + }, + "choices": { + "type": "array", + "items": { + "type": "object", + "properties": { + "delta": { + "type": "object", + "nullable": true, + "properties": { + "content": { + "type": "string", + "description": "The contents of the chunk message." + }, + "refusal": { + "type": "string", + "nullable": true, + "description": "The refusal message generated by the model." + }, + "role": { + "type": "string", + "enum": [ + "user", + "assistant", + "developer", + "system", + "tool" + ], + "description": "The role of the author of this message." + }, + "tool_calls": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "index": { + "type": "number" + }, + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "function": { + "type": "object", + "properties": { + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + }, + "name": { + "type": "string" + } + }, + "required": [ + "arguments", + "name" + ], + "description": "The function that the model called." + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool." + } + }, + "required": [ + "index", + "id", + "function", + "type" + ] + }, + "description": "The tool calls generated by the model, such as function calls." + } + }, + "required": [ + "content", + "role" + ], + "description": "A chat completion delta generated by streamed model responses." + }, + "finish_reason": { + "type": "string", + "enum": [ + "length", + "function_call", + "stop", + "tool_calls", + "content_filter" + ] + }, + "index": { + "type": "number", + "description": "The index of the choice in the list of choices." + }, + "logprobs": { + "type": "object", + "nullable": true, + "properties": { + "content": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The token." + }, + "bytes": { + "type": "array", + "items": { + "type": "number" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + }, + "top_logprobs": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The token." + }, + "bytes": { + "type": "array", + "items": { + "type": "number" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + } + }, + "required": [ + "token", + "bytes", + "logprob" + ] + }, + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned." + } + }, + "required": [ + "token", + "bytes", + "logprob" + ] + } + }, + "refusal": { + "type": "array", + "items": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The token." + }, + "bytes": { + "type": "array", + "items": { + "type": "number" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + }, + "top_logprobs": { + "type": "array", + "nullable": true, + "items": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The token." + }, + "bytes": { + "type": "array", + "items": { + "type": "number" + }, + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token." + }, + "logprob": { + "type": "number", + "description": "The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely." + } + }, + "required": [ + "token", + "bytes", + "logprob" + ] + }, + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned." + } + }, + "required": [ + "token", + "bytes", + "logprob" + ] + } + } + }, + "required": [ + "content", + "refusal" + ], + "description": "Log probability information for the choice." + } + }, + "required": [ + "finish_reason", + "index" + ] + }, + "description": "A list of chat completion choices. Can be more than one if n is greater than 1." + }, + "created": { + "type": "number", + "description": "The Unix timestamp (in seconds) of when the chat completion was created." + }, + "model": { + "type": "string", + "description": "The model used for the chat completion." + }, + "object": { + "type": "string", + "enum": [ + "chat.completion.chunk" + ], + "description": "The object type." + }, + "service_tier": { + "type": "string", + "nullable": true, + "enum": [ + "auto", + "default", + "flex", + "scale", + "priority" + ], + "description": "Specifies the processing type used for serving the request." + }, + "usage": { + "type": "object", + "nullable": true, + "properties": { + "prompt_tokens": { + "type": "number", + "description": "Number of tokens in the prompt.", + "example": 137 + }, + "completion_tokens": { + "type": "number", + "description": "Number of tokens in the generated completion.", + "example": 914 + }, + "total_tokens": { + "type": "number", + "description": "Total number of tokens used in the request (prompt + completion).", + "example": 1051 + }, + "completion_tokens_details": { + "type": "object", + "nullable": true, + "properties": { + "accepted_prediction_tokens": { + "type": "integer", + "nullable": true, + "description": "When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion." + }, + "audio_tokens": { + "type": "integer", + "nullable": true, + "description": "Audio input tokens generated by the model." + }, + "reasoning_tokens": { + "type": "integer", + "nullable": true, + "description": "Tokens generated by the model for reasoning." + }, + "rejected_prediction_tokens": { + "type": "integer", + "nullable": true, + "description": "When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits." + } + }, + "description": "Breakdown of tokens used in a completion.", + "example": null + }, + "prompt_tokens_details": { + "type": "object", + "nullable": true, + "properties": { + "audio_tokens": { + "type": "integer", + "nullable": true, + "description": "Audio input tokens present in the prompt." + }, + "cached_tokens": { + "type": "integer", + "nullable": true, + "description": "Cached tokens present in the prompt." + } + }, + "description": "Breakdown of tokens used in the prompt.", + "example": null + } + }, + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ], + "description": "Usage statistics for the completion request." + } + }, + "required": [ + "id", + "choices", + "created", + "model", + "object" + ] + } + } + }, + "description": "Successful response." + } + }, + "x-hideTryItPanel": true, + "x-codeSamples": [ + { + "lang": "cURL", + "source": "curl --request POST \\\n --url 'https://api.aimlapi.com/v1/chat/completions' \\\n --header 'Authorization: Bearer ' \\\n --header 'Content-Type: application/json' \\\n --data '{\"model\": \"alibaba/glm-5.2\", \"messages\": [\"\"]}'" + }, + { + "lang": "JavaScript", + "source": "const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer ',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"alibaba/glm-5.2\",\n \"messages\": [\n \"\"\n ]\n}),\n});\n\nconsole.log(await response.json());" + }, + { + "lang": "Python", + "source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v1/chat/completions\",\n headers={\n \"Authorization\": \"Bearer \",\n \"Content-Type\": \"application/json\",\n },\n json={'model': 'alibaba/glm-5.2', 'messages': ['']},\n)\n\nprint(response.json())" + } + ] + } + } + }, + "components": { + "securitySchemes": { + "access-token": { + "scheme": "bearer", + "bearerFormat": "", + "type": "http", + "description": "Bearer key" + } + } + } +} diff --git a/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.md b/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.md new file mode 100644 index 00000000..586be0cf --- /dev/null +++ b/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.md @@ -0,0 +1,147 @@ +# Glm 5.2 + +{% columns %} +{% column width="66.66666666666666%" %} +{% hint style="info" %} +This documentation is valid for the following list of our models: + +* `alibaba/glm-5.2` +{% endhint %} +{% endcolumn %} + +{% column width="33.33333333333334%" %} +Try in Playground +{% endcolumn %} +{% endcolumns %} + +## Model Overview + +GLM-5.2 is Zhipu AI flagship MoE LLM with a 1M-token context window, optimized for agentic coding, tool use, reasoning, and long-context tasks. + +{% hint style="success" %} +[Create AI/ML API Key](https://aimlapi.com/app/keys) +{% endhint %} + +
+ +How to make the first API call + +**1️⃣ Required setup (don’t skip this)**\ +▪ **Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\ +▪ **Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI. + +**2️ Copy the code example**\ +At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project. + +**3️ Update the snippet for your use case**\ +▪ **Insert your API key:** replace `` with your real AI/ML API key.\ +▪ **Select a model:** set the `model` field to the model you want to call.\ +▪ **Provide input:** fill in the request input field(s) shown in the example. + +**4️ (Optional) Tune the request**\ +See the API schema below for optional generation settings. + +**5️ Run your code**\ +Run the updated code in your development environment. + +{% hint style="success" %} +For a detailed walkthrough, use our [Quickstart guide](https://docs.aimlapi.com/quickstart/setting-up). +{% endhint %} + +
+ +## API Schema + +{% openapi-operation spec="glm-5-2" path="/v1/chat/completions" method="post" %} +[OpenAPI glm-5-2](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/Zhipu-AI/glm-5.2.json) +{% endopenapi-operation %} + +## Code Example + +{% tabs %} +{% tab title="Python" %} +{% code overflow="wrap" %} +```python +import requests + +response = requests.post( + "https://api.aimlapi.com/v1/chat/completions", + headers={ + "Authorization": "Bearer ", + "Content-Type": "application/json", + }, + json={'model': 'alibaba/glm-5.2', 'messages': ['']}, +) + +print(response.json()) +``` +{% endcode %} +{% endtab %} + +{% tab title="JavaScript" %} +{% code overflow="wrap" %} +```javascript +const response = await fetch('https://api.aimlapi.com/v1/chat/completions', { + method: 'POST', + headers: { + 'Authorization': 'Bearer ', + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + "model": "alibaba/glm-5.2", + "messages": [ + "" + ] +}), +}); + +console.log(await response.json()); +``` +{% endcode %} +{% endtab %} +{% endtabs %} + +
+ +Response + +{% code overflow="wrap" %} +```json +{ + "id": "chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMl", + "object": "chat.completion", + "created": 1762343744, + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "Hello! I'm just a program, so I don't have feelings, but I'm here and ready to help you. How can I assist you today?", + "refusal": null, + "annotations": null, + "audio": null, + "tool_calls": null + }, + "finish_reason": "stop", + "logprobs": null + } + ], + "model": "alibaba/glm-5.2", + "usage": { + "prompt_tokens": 137, + "completion_tokens": 914, + "total_tokens": 1051, + "completion_tokens_details": null, + "prompt_tokens_details": null + }, + "meta": { + "usage": { + "credits_used": 120000, + "usd_spent": 0.06 + } + } +} +``` +{% endcode %} + +