クイックスタート
始める
数分で API リクエストを開始するために必要なすべて。
ベース URL
すべての API リクエストは次のベース URL に送信する必要があります:
BASE URL
https://api.airforce利用可能なエンドポイント
POST
/v1/chat/completionsOpenAI 互換チャットPOST
/v1/messagesAnthropic 互換メッセージPOST
/v1/images/generations画像とメディア生成GET
/v1/models利用可能なモデルをリストレート制限
レート制限はプランティアごとに適用されます。制限は分あたりリクエスト(RPM)と日あたりリクエスト(RPD)で測定されます。
| プラン | RPM | RPD |
|---|---|---|
| Free | 1 RPM | 1,000 RPD |
| Premium | 5 RPM | 5,000 RPD |
| Master | 10 RPM | 無制限RPD |
注意: 正の残高を持つ従量課金ユーザーは、これらの階層レート制限を完全にバイパスします。
クイック例
cURL
curl https://api.airforce/v1/chat/completions \
-H "Authorization: Bearer sk-air-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4.1-mini",
"messages": [{"role": "user", "content": "Say hello!"}],
"max_tokens": 100
}'Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.airforce/v1",
api_key="sk-air-YOUR_API_KEY"
)
response = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[{"role": "user", "content": "Say hello!"}],
max_tokens=100
)
print(response.choices[0].message.content)Node.js
import OpenAI from 'openai';
const client = new OpenAI({
baseURL: 'https://api.airforce/v1',
apiKey: 'sk-air-YOUR_API_KEY',
});
const response = await client.chat.completions.create({
model: 'gpt-4.1-mini',
messages: [{ role: 'user', content: 'Say hello!' }],
max_tokens: 100,
});
console.log(response.choices[0].message.content);モデルディスカバリー
/v1/models エンドポイントを使用して、機能と料金を含むすべての利用可能なモデルのリストを取得します。
curl https://api.airforce/v1/models -H "Authorization: Bearer sk-air-YOUR_API_KEY"ヒント: リアルタイムステータス、料金、コンテキストウィンドウを表示するモデルページで、モデルを視覚的に閲覧することもできます。