Build with Waterfall
Waterfall is an OpenAI-compatible API gateway. Point your app at our base URL, pick a routing strategy, and let Waterfall choose the smartest capable model for each request.
https://api.getwaterfall.org/v1Use a Waterfall API key with prepaid credits. x402 is the easiest low-minimum way to add credits.
OpenAI-compatible chat completions. Most OpenAI SDK code works with a base URL change.
Quick Start
free_smart for free agent work, or auto for the default cascade.Examples
from openai import OpenAI
client = OpenAI(
base_url="https://api.getwaterfall.org/v1",
api_key="wf-sk-your-key"
)
response = client.chat.completions.create(
model="auto",
extra_body={"routing_strategy": "free_smart"},
messages=[{"role": "user", "content": "Write a short launch checklist"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.getwaterfall.org/v1",
apiKey: "wf-sk-your-key",
});
const response = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Write a short launch checklist" }],
extra_body: { routing_strategy: "free_smart" },
});
console.log(response.choices[0].message.content);curl https://api.getwaterfall.org/v1/chat/completions \
-H "Authorization: Bearer wf-sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"routing_strategy": "free_smart",
"messages": [
{"role": "user", "content": "Write a short launch checklist"}
]
}'Routing Strategies
A strategy tells Waterfall what matters for this request: cost, tools, long context, privacy, voice, retrieval, or quality.
free_smartFree tool-capable models for agents, retries, and high-volume worker tasks
orchestratorPlanner-grade routing for hard agent tasks and synthesis
tool_callingModels that are good at tools, JSON, and structured output
context_maxLong-context models for docs, repos, and RAG
smart_imageImage generation and image editing models
smart_transcribeAudio to text
smart_voiceVoice input and output
smart_embeddingEmbedding models for search and RAG
smart_rerankRerank models for better retrieval results
smart_safetyModeration, PII, and safety checks
privacy_smartZero Data Retention and direct-provider routes where available
x402 Payments
x402 lets software pay with USDC on Base. In Waterfall, it is the lower-minimum way to buy prepaid credits: $5 instead of the $25 card minimum.
Non-crypto users can still pay by card. x402 is there for agents and developers who want cheaper, simpler credit top-ups without card rails.
Free strategies stay free. Paid strategies draw down prepaid credits by the actual model and token usage reported for each request.
# x402 credit top-ups use USDC on Base.
# Minimum: $5 with x402, or $25 by card.
# Wallet: 0xBF5205788d5f5817822ccDD724b6b3e967DA8d75
curl https://api.getwaterfall.org/api/v1/billing/credits \
-H "Authorization: Bearer $WATERFALL_API_KEY"Privacy and Regulated Data
privacy_smart uses Zero Data Retention routes and direct-provider routes where available. That is useful for privacy-sensitive apps.
Zero Data Retention means prompt and response content should not be stored after the request is processed. It does not mean the request was never processed by a provider, and it does not automatically make the route HIPAA compliant or safe for privileged legal work.
If you handle PHI, client secrets, or regulated data, you may need a BAA, DPA, approved subprocessors, audit logs, region controls, and retention controls. Use a covered direct-provider route for that work. Do not rely on a generic privacy route as your compliance plan.
Models
Waterfall keeps a live catalog of chat, reasoning, coding, vision, image, audio, embedding, rerank, safety, and moderation models. Use Models to inspect the current list and see which strategies each model belongs to.