Sozdai LogoDocs

クイックスタート

数分で連携。OpenAI 完全互換、base_url を1つ変えるだけ。

#概要

この API は OpenAI 完全互換です。任意の OpenAI SDK やツールの base_url を下記のアドレスに向け、ヘッダーにキーを送信すれば、利用可能な任意のモデルを呼び出せます。

Base URL: https://api.foxwire.ai/v1

#3-Step Quickstart Guide

1

Get your API key

Create a secure API key in the console to authorize requests. Keep your key confidential.

API Keys

API keys are created inside the **API 密钥 (API Keys)** section. All keys start with `sk-corr-`.
2

Configure authorization headers

Include the API key in the request headers for authorization:

http
Authorization: Bearer sk-corr-...
3

Send your first request

Point the API client to the Base URL and invoke the completion endpoint:

curl https://api.foxwire.ai/v1/chat/completions \
  -H "Authorization: Bearer $CORRY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

#ストリーミング

stream: true を設定すると、OpenAI 形式でトークンを逐次受信し、data: [DONE] で終了します。

python
resp = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello"}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

#パラメータ

リクエストボディは OpenAI と同じです。一般的なパラメータを以下に示します。その他の OpenAI フィールドもサポートされています:

パラメータ種類説明
streambooleanレスポンスをストリーミング(SSE)
max_tokensinteger生成する最大トークン数
temperaturenumberサンプリング温度、0〜2
toolsarray関数呼び出し(tools)
stopstring[]停止シーケンス
reasoning_effortstring思考を有効化:low / medium / high

#エラーコード

エラーは標準の error オブジェクト(message と type フィールドを含む)を返します。一般的なステータスコード:

ステータス意味
401キーが無効または欠落しています
402残高が不足しています
404要求されたモデルが存在しないか利用できません
429レート制限中 — しばらくして再試行してください
502サービスが一時的に利用できません。再試行してください