Skip to main content
Messages is Claude’s native interface and exposes everything Claude can do: adaptive thinking, tool use, image and PDF understanding, prompt caching. The Anthropic SDKs, Claude Code and other tools that accept a custom Anthropic base URL connect by changing the base URL and the API Key.

Models

The current Claude generation takes text and image input, returns text, and uses adaptive thinking by default: the model decides how much to think, and output_config.effort steers it. Context window and max output are in tokens, as published by each model’s vendor. The full list with prices is in the model catalog; GET /v1/models lists the models your API Key can use.

Endpoints

The base URL is https://api.dreamto.ai. Create an API Key in the DreamTo console; see Authentication.

Quick start

Streaming

Add "stream": true and the reply arrives as server-sent events: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop. Text is in delta.text of content_block_delta; usage is in message_start and message_delta.
Python

Use with Claude Code

Set two environment variables, then start Claude Code:

Notes

  • The API Key goes in the x-api-key header, or in Authorization: Bearer.
  • anthropic-version is optional and defaults to 2023-06-01; the anthropic-beta header is passed on to the model unchanged.
  • POST /v1/messages is available; token counting (count_tokens), Message Batches and the Files API are not.
  • Errors use one common structure, see Errors.