Endpoints
Messages
POST https://relumen.ai/v1/messages
Send a conversation to a supported Claude model in Anthropic format. Use the model and features available to your key's group.
Anthropic key required · yellow
Use an Anthropic-format key. A key assigned to an incompatible group can return model_not_found, even when the model name is correct.
Headers
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | Your Relumen key |
anthropic-version | Yes | 2023-06-01 |
content-type | Yes | application/json |
Body
modelstringrequiredExact model call name from Model Plaza.
messagesarrayrequiredConversation turns with role and content.
max_tokensintegerrequiredMaximum number of tokens to generate.
systemstringoptionalInstructions that guide the conversation.
streambooleanoptionalSet to true for a Server-Sent Events stream when supported.
For a basic text turn, use "role": "user" and a string for content. Feature support and token limits depend on the selected model and route.
Example request
Replace both placeholders before running this command.
curl https://relumen.ai/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello!"}
]
}'Example response
Illustrative non-streaming response. Identifiers, text, and usage vary by request.
{
"id": "msg_example",
"type": "message",
"role": "assistant",
"model": "YOUR_MODEL_ID",
"content": [
{"type": "text", "text": "Hello! How can I help you?"}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 18,
"output_tokens": 12
}
}Usage & troubleshooting
Review Usage Records in the console for tokens and cost. If the call fails, confirm the exact model name, Anthropic key format, selected group, and remaining account balance. See Errors & troubleshooting.