Skip to main content
DreamTo is compatible with all three official SDKs. Just change the Base URL to DreamTo and use your DreamTo API key. The examples below read the key from the DREAMTO_API_KEY environment variable:

OpenAI SDK

For GPT, DeepSeek, Kimi, GLM, Grok and similar models. Install: pip install openai or npm i openai.
GPT models can also use the Responses API: client.responses.create(model="gpt-6.2-sol", input="..."). See OpenAI Responses.

Anthropic SDK

For the Claude family. Install: pip install anthropic or npm i @anthropic-ai/sdk.

Google GenAI SDK

For the Gemini family. Install: pip install google-genai or npm i @google/genai.

Next steps

OpenAI Chat Completions

All parameters, streaming and function calling.

OpenAI Responses

Reasoning effort and typed streaming events.

Anthropic Messages

Thinking, tool use and prompt caching.

Gemini generateContent

Multimodal input, thinking and streaming.