Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

模型目錄

Lazu 會按目前 API Key 返回可存取模型集合。生產用戶端、agent 和腳本應在執行時讀取 catalog,而不是把模型名稱寫死。

GET /api/models/catalog

curl https://api.lazu.ai/api/models/catalog \
  -H "Authorization: Bearer $LAZU_API_KEY"

響應會包含:

  • idproviderowned_by
  • modality.input / modality.output
  • capabilities
  • supported_endpoint_types
  • supported_endpoints
  • default_endpoint_type
  • context_lengthmax_output_tokens
  • 目前 key 的有效 pricing
  • usage_capabilities
  • supported_parametersparameters

如何選模型

需求關注欄位常用 endpoint
文字聊天modality.output 包含 text/v1/chat/completions
多模態/圖片輸入modality.input 包含 image/v1/chat/completions/v1/responses
推理模型capabilities.supports_reasoning === true/v1/responses
Embeddingssupported_endpoint_types 包含 embeddings/v1/embeddings
工具呼叫capabilities.supports_function_calling === true/v1/chat/completions

除非用戶端 SDK 明確需要 Anthropic/Gemini 原生介面,否則優先使用 default_endpoint_type

Usage 和 cache metadata

每個模型都有 usage_capabilities,讓用戶端在發請求前知道可能出現哪些 usage 維度:

維度含義
cache_read命中並讀取既有 cache 的輸入 token
cache_writeprovider 返回總 cache write token 但沒有 TTL bucket
cache_write_5m5 分鐘 TTL 的 cache creation/write token
cache_write_1h1 小時 TTL 的 cache creation/write token
cache_missprovider 單獨上報的 cache miss token

使用 reported_dimensions 判斷哪些欄位可能出現,使用 billable_dimensions 判斷哪些維度會影響價格。

/v1/models

如果你的 SDK 呼叫 OpenAI 風格的 models.list(),Lazu 也提供扁平響應:

curl https://api.lazu.ai/v1/models \
  -H "Authorization: Bearer $LAZU_API_KEY"

但它只適合 SDK 相容。需要路由、價格、能力、參數和 usage metadata 時,請使用 /api/models/catalog

相關頁面