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 ドキュメント

Lazu は統合 AI モデルゲートウェイです。1 つの API Key で主要なモデル provider に接続しつつ、OpenAI 互換呼び出し、provider ネイティブの endpoint、モデル検索、クォータ管理、利用ログを利用できます。

Base URLHosted Lazu uses https://api.lazu.ai. For self-hosting, replace it with your own API domain.
モデルカタログGET /api/models/catalog は、現在の API Key で実際に利用可能なモデルと機能を返します。
コードサンプルチャット、ストリーミング、マルチモーダル、エラー処理(現在は英語のみ)。API リファレンスインタラクティブな OpenAPI リファレンス(現在は英語のみ)。

認証

最も汎用的な認証方式:

Authorization: Bearer YOUR_API_KEY
インターフェース推奨認証方式
OpenAI 互換Authorization: Bearer YOUR_API_KEY
Anthropic ネイティブx-api-key: YOUR_API_KEY + anthropic-version
Gemini ネイティブ?key=YOUR_API_KEY または x-goog-api-key: YOUR_API_KEY

クイックスタート

curl https://api.lazu.ai/api/models/catalog \
  -H "Authorization: Bearer YOUR_API_KEY"
from openai import OpenAI
 
client = OpenAI(
    base_url="https://api.lazu.ai/v1",
    api_key="YOUR_API_KEY",
)
 
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello from Lazu"}],
)
print(response.choices[0].message.content)

詳しいサンプルやトラブルシューティングは English 版 をご覧ください。