POST
/
v1
/
anthropic
/
chat
/
completions
curl --location 'https://api.altrum.ai/v1/anthropic/chat/completions' --header 'Authorization: ANTHROPIC_API_KEY' --header 'Project-Api-Key: ALTRUMAI_PROJECT_API_KEY' --header 'Content-Type: application/json' --data '{
    "model":"claude-3-opus-20240229",
    "messages": [
        {"role":"user", "content":"Hello"},
        {"role":"system", "content":"You are a helpful assistant"}
    ],
    "stream":false
}'
{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "Hello! How can I assist you today?",
        "role": "assistant"
      }
    }
  ],
  "created": 1739866771,
  "id": "chatcmpl-39a86c29-a8d0-4d97-b1a3-a522daac1d08",
  "model": "claude-3-opus-20240229",
  "object": "chat.completion",
  "usage": {
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "completion_tokens": 12,
    "prompt_tokens": 13,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "total_tokens": 25
  }
}

Note: Only Chat Completion LLMs are compatible with this proxy.

Authorizations

Project-Api-Key
string
header
required

Headers

authorization
string
required

Anthropic API key

Body

application/json

Schema for Anthropic API requests.

Response

200
application/json

Successful Response

Schema for LLM model responses.