TensaHub › OpenRouter

Cohere: Command A+

API del modelo cohere/command-a-plus en OpenRouter, $0.3 / $1.5 por millón de tokens, contexto 192.000 tokens. Ejemplos en curl, Python y JavaScript, prueba en directo.

Probar y valorar en el catálogo

Command A+ is Cohere's flagship model for enterprise agentic workflows. It accepts text and image inputs with a 192K context window, supports native tool calling with strict tool schemas, structured...

Tipo
Modelo
Proveedor
OpenRouter
ID del modelo
cohere/command-a-plus
Precio
De pago
Precio entrada / salida
$0.3 / $1.5 por millón de tokens
Acceso sin clave
No
Variable de clave
OPENROUTER_API_KEY
URL base (compatible con OpenAI)
https://openrouter.ai/api/v1
Contexto
192.000 tokens
Entradas
Texto, Imagen
Funciones
Razonamiento, Salida JSON, Llamada a herramientas
Valoración de desarrolladores
Aún sin valorar
Documentación
https://openrouter.ai/cohere/command-a-plus

Ejemplos de código

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-plus","messages":[{"role":"user","content":"Hola, preséntate en una frase."}]}'

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-plus",
    messages=[{"role": "user", "content": "Hola, preséntate en una frase."}],
)
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-plus',
  messages: [{ role: 'user', content: 'Hola, preséntate en una frase.' }],
})
console.log(r.choices[0].message.content)

Generar el código de integración →

Búsquedas populares

Preguntas frecuentes

¿Es gratuita la API de Cohere: Command A+?

No: Cohere: Command A+ es una API de pago ($0.3 / $1.5 por millón de tokens).

¿Cómo llamo a Cohere: Command A+ desde mi código?

Cohere: Command A+ ofrece una API compatible con OpenAI en https://openrouter.ai/api/v1: usa cualquier SDK de OpenAI (Python, JavaScript…) con esta URL base. Identificador del modelo: cohere/command-a-plus. Hay código listo para usar (streaming, JSON, reintentos) en la caja de herramientas para desarrolladores.

¿Cuál es la ventana de contexto de Cohere: Command A+?

Cohere: Command A+ acepta hasta 192.000 tokens de contexto (mensaje e historial).

¿Qué alternativas hay a Cohere: Command A+?

API similares del catálogo: Cohere: Command A, Cohere: Command R7B (12-2024), Cohere: Command R (08-2024), Cohere: Command R+ (08-2024).

Alternativas