Skip to main content
POST https://api.ethereal.llc/v1/messages
The Anthropic-native endpoint. The request and response format matches the Anthropic Messages API, so the official Anthropic SDKs work — just point base_url at https://api.ethereal.llc/v1 and use an eth-... key.

Headers

HeaderValue
AuthorizationBearer eth-... (or x-api-key: eth-...)
Content-Typeapplication/json

Body parameters

model
string
required
Model ID: claude-opus-4-8, claude-sonnet-4-6, or claude-haiku-4-5.
messages
array
required
A list of messages. Each is { "role": "user" | "assistant", "content": ... }, where content is either a string or an array of content blocks (text, image, tool_use, tool_result).
max_tokens
integer
required
Maximum number of tokens to generate.
system
string | array
The system prompt. A string, or an array of text blocks.
stream
boolean
default:"false"
If true, the response arrives as a stream (SSE). See Streaming.
tools
array
Tool definitions in the Anthropic format: { "name": string, "description": string, "input_schema": object }.
temperature
number
Sampling temperature. Lower is more deterministic.
top_p
number
Nucleus sampling, an alternative to temperature.
stop_sequences
string[]
Sequences that stop generation when produced.

Example request

curl https://api.ethereal.llc/v1/messages \
  -H "x-api-key: eth-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 200,
    "system": "You are a concise assistant.",
    "messages": [
      { "role": "user", "content": "Explain recursion in one sentence." }
    ]
  }'

SDK examples

import anthropic

client = anthropic.Anthropic(
    base_url="https://api.ethereal.llc/v1",
    api_key="eth-...",
)

msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=200,
    messages=[{"role": "user", "content": "Explain recursion in one sentence."}],
)
print(msg.content[0].text)

Response

{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "model": "claude-sonnet-4-6",
  "content": [
    { "type": "text", "text": "Recursion is when a function calls itself until it reaches a base case." }
  ],
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": { "input_tokens": 28, "output_tokens": 17 }
}
When the model calls a tool, content contains a tool_use block and stop_reason is tool_use:
{
  "type": "tool_use",
  "id": "toolu_...",
  "name": "get_weather",
  "input": { "city": "Paris" }
}
Both tool use and streaming are supported. For streamed responses (stream: true), see Streaming.