Multiple models. One way to connect.
Access OpenAI, Anthropic, Gemini and other model services through an OpenAI-compatible interface. Check the console for available models.
Haoduo AI is an AI API relay and prepaid credit platform for individual developers, startups, content creators and enterprise customers.
Access OpenAI, Anthropic, Gemini and other model services through an OpenAI-compatible interface. Check the console for available models.
Purchase prepaid AI API credits. Inference charges are deducted according to actual usage, with records available in the console.
Manage API Keys and review Token consumption, account balances and billing in the console.
Register at haoduo.ai and open your console.
Confirm your order and pay. Credits are added instantly to your account.
Get an API Key, configure the endpoint and start making requests.
Your purchase is prepaid AI API service credit, not a physical product, model ownership or financial asset. After successful payment, credits are added instantly to the associated account and deducted as you use model inference.
Test an idea, build a tool and connect personal projects to AI.
Build AI-powered products and monitor usage and charges centrally.
Connect writing, ideation and creative workflows to model capabilities.
Integrate model inference into internal tools and business applications.
Find your actual API Base URL, API Key and available model IDs in the console, then replace the placeholders in this example. Supported parameters and capabilities vary by model.
This example illustrates the request format and does not call an API. Never expose a real key in frontend code or a public repository.
// Replace placeholders with values from your console.
const baseUrl = "YOUR_API_BASE_URL".replace(/\/$/, "");
const apiKey = "YOUR_API_KEY";
const response = await fetch(
`${baseUrl}/chat/completions`, {
method: "POST",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "YOUR_MODEL_ID",
messages: [{ role: "user", content: "Hello, AI." }]
})
}
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();Explore a more flexible way to bring AI models to your product.