Anthropic messages, governed and recorded
Set the Anthropic SDK baseURL to https://www.spendline.ai. WITHOUT /v1. The Anthropic SDK appends /v1/messages itself. This asymmetry with the OpenAI SDK is real; do not "fix" it.
Streaming is supported.
Request
- Base URL: https://www.spendline.ai
- URL: https://www.spendline.ai/v1/messages
- Auth: API key in header x-spendline-key
Headers
The application's OWN Anthropic key. Forwarded upstream. The SPENDLINE key must NOT go here, put it in x-spendline-key.
Stable name of the bot/agent/feature making the call, e.g. support-bot. One per agent. Not per request. Required when attribution enforcement is enabled.
The end customer this request is billable to. PER REQUEST. A hardcoded value makes per-customer cost attribution useless, thread it from request context. Required when attribution enforcement is enabled.
JSON object that must include a cost-centre key: one of cost_center, costCenter, department, or team. Example: {"team":"support","env":"prod"} Per call site or per request. Required when attribution enforcement is enabled.
Groups a multi-step run.
Labels a step within a workflow.
The application route that triggered the call.
Request body
Example request
{
"model": "claude-sonnet-5"
}Response
Anthropic response, passed through unchanged. The call is recorded.
Changes
No recorded changes to this operation across all 1 revision of this API.