TensaHub › Cohere

Cohere · command-a-03-2025

Cohere の command-a-03-2025 モデル API,料金はプロバイダーにて。curl・Python・JavaScript のコード例とライブテスト。

カタログでテスト・評価する

Free trial keys (non-commercial use).

種類
モデル
プロバイダー
Cohere
モデル ID
command-a-03-2025
料金
無料 + 有料
キーなしで利用
いいえ
キーの環境変数
COHERE_API_KEY
ベース URL(OpenAI 互換)
https://api.cohere.ai/compatibility/v1
入力
テキスト
開発者の評価
まだ評価がありません
ドキュメント
https://docs.cohere.com/docs/rate-limits

コード例

cURL

curl https://api.cohere.ai/compatibility/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $COHERE_API_KEY" \
  -d '{"model":"command-a-03-2025","messages":[{"role":"user","content":"こんにちは。一文で自己紹介してください。"}]}'

Python

# pip install openai
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.cohere.ai/compatibility/v1", api_key=os.environ["COHERE_API_KEY"])
r = client.chat.completions.create(
    model="command-a-03-2025",
    messages=[{"role": "user", "content": "こんにちは。一文で自己紹介してください。"}],
)
print(r.choices[0].message.content)

JavaScript

// npm install openai
import OpenAI from 'openai'

const client = new OpenAI({ baseURL: 'https://api.cohere.ai/compatibility/v1', apiKey: process.env.COHERE_API_KEY })
const r = await client.chat.completions.create({
  model: 'command-a-03-2025',
  messages: [{ role: 'user', content: 'こんにちは。一文で自己紹介してください。' }],
})
console.log(r.choices[0].message.content)

組み込みコードを生成 →

人気の検索

よくある質問

Cohere · command-a-03-2025 の API は無料ですか?

Cohere · command-a-03-2025 には制限付きの無料枠があり、それを超えると有料です。

コードから Cohere · command-a-03-2025 を呼び出すには?

Cohere · command-a-03-2025 は https://api.cohere.ai/compatibility/v1 で OpenAI 互換 API を提供しています。このベース URL を指定すれば、任意の OpenAI SDK(Python、JavaScript など)で利用できます。 モデル ID:command-a-03-2025。 ストリーミング・JSON・再試行に対応したすぐ使えるコードを開発者ツールキットで提供しています。