クイックスタート
数分で連携。OpenAI 完全互換、base_url を1つ変えるだけ。
LLM Chat completions
Call leading models like Claude, GPT-4, and DeepSeek via a single OpenAI-compatible API endpoint.
Media generation
Submit asynchronous media generation tasks for image, video, and music models with simple polling.
Prompt caching
Save up to 90% in token pricing on supported models by caching long, static context sequences.
Deep thinking models
Control reasoning effort (low/medium/high) for models like o1/o3 and DeepSeek-R1 natively.
#概要
この API は OpenAI 完全互換です。任意の OpenAI SDK やツールの base_url を下記のアドレスに向け、ヘッダーにキーを送信すれば、利用可能な任意のモデルを呼び出せます。
https://api.foxwire.ai/v1#3-Step Quickstart Guide
Get your API key
Create a secure API key in the console to authorize requests. Keep your key confidential.
API Keys
Configure authorization headers
Include the API key in the request headers for authorization:
Authorization: Bearer sk-corr-...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] で終了します。
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 フィールドもサポートされています:
| パラメータ | 種類 | 説明 |
|---|---|---|
stream | boolean | レスポンスをストリーミング(SSE) |
max_tokens | integer | 生成する最大トークン数 |
temperature | number | サンプリング温度、0〜2 |
tools | array | 関数呼び出し(tools) |
stop | string[] | 停止シーケンス |
reasoning_effort | string | 思考を有効化:low / medium / high |
#エラーコード
エラーは標準の error オブジェクト(message と type フィールドを含む)を返します。一般的なステータスコード:
| ステータス | 意味 |
|---|---|
401 | キーが無効または欠落しています |
402 | 残高が不足しています |
404 | 要求されたモデルが存在しないか利用できません |
429 | レート制限中 — しばらくして再試行してください |
502 | サービスが一時的に利用できません。再試行してください |