واجهة برمجة النموذج cohere/command-a لدى OpenRouter, $2.5 / $10 لكل مليون رمز, سياق 256,000 رمز. أمثلة بـ curl وPython وJavaScript، واختبار مباشر.
Command A is an open-weights 111B parameter model with a 256k context window focused on delivering great performance across agentic, multilingual, and coding use cases. Compared to other leading proprietary...
- النوع
- نموذج
- المزوّد
- OpenRouter
- معرّف النموذج
cohere/command-a- التسعير
- مدفوع
- سعر الإدخال / الإخراج
- $2.5 / $10 لكل مليون رمز
- الوصول دون مفتاح
- لا
- متغيّر المفتاح
OPENROUTER_API_KEY- عنوان URL الأساسي (متوافق مع OpenAI)
https://openrouter.ai/api/v1- السياق
- 256,000 رمز
- المدخلات
- نص
- الميزات
- مخرجات JSON, استدعاء الأدوات
- تقييم المطوّرين
- لم يُقيَّم بعد
- التوثيق
- https://openrouter.ai/cohere/command-a
أمثلة برمجية
cURL
curl https://openrouter.ai/api/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-d '{"model":"cohere/command-a","messages":[{"role":"user","content":"مرحبًا، عرّف بنفسك في جملة واحدة."}]}'Python
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=os.environ["OPENROUTER_API_KEY"])
r = client.chat.completions.create(
model="cohere/command-a",
messages=[{"role": "user", "content": "مرحبًا، عرّف بنفسك في جملة واحدة."}],
)
print(r.choices[0].message.content)JavaScript
// npm install openai
import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://openrouter.ai/api/v1', apiKey: process.env.OPENROUTER_API_KEY })
const r = await client.chat.completions.create({
model: 'cohere/command-a',
messages: [{ role: 'user', content: 'مرحبًا، عرّف بنفسك في جملة واحدة.' }],
})
console.log(r.choices[0].message.content)
عمليات بحث شائعة
الأسئلة الشائعة
هل واجهة Cohere: Command A مجانية؟
لا: Cohere: Command A واجهة مدفوعة ($2.5 / $10 لكل مليون رمز).
كيف أستدعي Cohere: Command A من شيفرتي؟
يوفّر Cohere: Command A واجهة متوافقة مع OpenAI على العنوان https://openrouter.ai/api/v1: استخدم أي مكتبة OpenAI (Python أو JavaScript…) مع عنوان URL الأساسي هذا. معرّف النموذج: cohere/command-a. تتوفّر شيفرة جاهزة (بث، JSON، إعادة محاولة) في صندوق أدوات المطوّر.
ما حجم نافذة السياق في Cohere: Command A؟
يقبل Cohere: Command A حتى 256,000 رمز من السياق (الرسالة والسجل).
ما بدائل Cohere: Command A؟
واجهات مشابهة في الفهرس: Cohere: Command A+, Cohere: Command R7B (12-2024), Cohere: Command R (08-2024), Cohere: Command R+ (08-2024).
بدائل
- Cohere: Command A+ — مدفوع
- Cohere: Command R7B (12-2024) — مدفوع
- Cohere: Command R (08-2024) — مدفوع
- Cohere: Command R+ (08-2024) — مدفوع