TensaHub › OpenRouter

Cohere: Command A+

API do modelo cohere/command-a-plus na OpenRouter, $0.3 / $1.5 por milhão de tokens, contexto 192.000 tokens. Exemplos em curl, Python e JavaScript, teste ao vivo.

Testar e avaliar no 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
Provedor
OpenRouter
ID do modelo
cohere/command-a-plus
Preço
Pago
Preço entrada / saída
$0.3 / $1.5 por milhão de tokens
Acesso sem chave
Não
Variável da chave
OPENROUTER_API_KEY
URL base (compatível com OpenAI)
https://openrouter.ai/api/v1
Contexto
192.000 tokens
Entradas
Texto, Imagem
Recursos
Raciocínio, Saída JSON, Chamada de ferramentas
Avaliação dos desenvolvedores
Ainda sem avaliação
Documentação
https://openrouter.ai/cohere/command-a-plus

Exemplos 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":"Olá, apresente-se em uma 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": "Olá, apresente-se em uma 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: 'Olá, apresente-se em uma frase.' }],
})
console.log(r.choices[0].message.content)

Gerar o código de integração →

Buscas populares

Perguntas frequentes

A API do Cohere: Command A+ é gratuita?

Não: o Cohere: Command A+ é uma API paga ($0.3 / $1.5 por milhão de tokens).

Como chamar o Cohere: Command A+ no meu código?

O Cohere: Command A+ oferece uma API compatível com OpenAI em https://openrouter.ai/api/v1: use qualquer SDK da OpenAI (Python, JavaScript…) com essa URL base. Identificador do modelo: cohere/command-a-plus. Há código pronto (streaming, JSON, novas tentativas) na caixa de ferramentas do desenvolvedor.

Qual é a janela de contexto do Cohere: Command A+?

O Cohere: Command A+ aceita até 192.000 tokens de contexto (mensagem e histórico).

Quais são as alternativas ao Cohere: Command A+?

APIs semelhantes no catálogo: Cohere: Command A, Cohere: Command R7B (12-2024), Cohere: Command R (08-2024), Cohere: Command R+ (08-2024).

Alternativas