Skip to content

Anthropic Compatible (Messages)

Qevron also speaks Anthropic's Messages API format. So you can use the anthropic SDK or your existing Anthropic-format code by just changing the address.

POST/v1/messages

Request parameters

FieldTypeRequiredDescription
modelstringModel name
messagesarray{ role, content } messages
max_tokensintegerMax tokens to generate
systemstringSystem instruction
temperaturenumberCreativity
streambooleanSSE stream

Example

bash
curl https://app.qevron.ai/v1/messages \
  -H "Authorization: Bearer $QEVRON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "verinova",
    "max_tokens": 256,
    "system": "You are a helpful assistant.",
    "messages": [
      { "role": "user", "content": "Hello!" }
    ]
  }'
python
import anthropic

client = anthropic.Anthropic(
    api_key="QEVRON_API_KEY",
    base_url="https://app.qevron.ai",   # /v1/messages is appended automatically
)

msg = client.messages.create(
    model="verinova",
    max_tokens=256,
    system="You are a helpful assistant.",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content)

Authentication

The Anthropic SDK uses the x-api-key header; Qevron accepts it (see Authentication). Authorization: Bearer also works.

Response

A response in Anthropic Messages format is returned; the generated text is in content blocks:

json
{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "model": "verinova",
  "content": [ { "type": "text", "text": "Hello! How can I help you?" } ],
  "stop_reason": "end_turn",
  "usage": { "input_tokens": 14, "output_tokens": 11 }
}

TIP

If you prefer the OpenAI format, you can also reach the same model via /v1/chat/completions.

Qevron — AI gateway. Arpanet / OpenAI / Anthropic / Gemini compatible.