Velaron.AI

DocsAPI reference

Messages

The Anthropic Messages shape, for Anthropic SDKs and Claude Code. Errors come back in Anthropic's shape too, so those clients behave normally.

POST/v1/messages

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({ baseURL: "https://velaron.ai/v1", apiKey: "sk_••••••••" });
const reply = await client.messages.create({
  model: "anthropic/claude-sonnet-4.5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "hi" }],
});
console.log(reply.content[0].text);

Request#

modelstring · required

A chat model id. Anthropic models look like anthropic/claude-sonnet-4.5, but any chat model on the server works through this endpoint.

max_tokensinteger · required

Required by the Anthropic API and by Velaron.AI. Must be a positive integer; it is lowered when your balance cannot cover it.

messagesarray · required

A non-empty array of Anthropic-style messages.

systemstring | array

Counted toward the input estimate, then forwarded.

anthropic-versionheader

Forwarded to the provider. Defaults to 2023-06-01 when your client sends none.

Billing details#

Cache reads and cache writes reported by the model are billed at its cache prices. Streams are read from message_start, message_delta and content_block_delta events and settled when the stream ends. A streamed Messages call carries no in-band credit report.

Errors#

Anthropic error shape
{
  "type": "error",
  "error": {
    "type": "billing_error",
    "message": "You are out of credits. Buy more on your Velaron.AI dashboard.",
    "code": "insufficient_credits"
  }
}
StatusAnthropic typeVelaron.AI code
400invalid_request_errorinvalid_body · model_not_supported
401authentication_errorinvalid_api_key
402billing_errorinsufficient_credits
404not_found_errormodel_not_found
429rate_limit_errorrate_limit_exceeded
5xxapi_errorprovider_unreachable · provider_not_configured