Anthropic Messages API, answered by Polar
POST
/api/v1/messagesPoint Claude Code at Polaris with ANTHROPIC_BASE_URL set to the origin plus /api. Needs polar.use. The model can be a tier (fable, opus, sonnet, haiku), provider/model, or automatic; your routing decides the rest.
En esta página
Cuerpo
| Campo | Tipo | Descripción |
|---|---|---|
modelobligatorio | string |
Esquema JSON
{
"type": "object",
"properties": {
"model": {
"type": "string"
}
},
"required": [
"model"
]
}Petición de ejemplo
curl -X POST "https://polaris.example.com/api/v1/messages" \
-H "Authorization: Bearer $POLARIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "string"
}'Respuestas
| Estado | Qué es |
|---|---|
200 | OK |
También puede dar los errores comunes 400, 401, 403, 404, 429. Ver errores comunes