Quick Start
Welcome to HuosuAI! This guide will help you register and make your first API call in minutes. HuosuAI is fully compatible with the OpenAI API format — if you're already using OpenAI's SDK, simply swap the Base URL and you're good to go.
1. Create an Account
- Visit HuosuAI and click "Sign Up"
- Register with your email address
- After registration, you'll receive free trial credits to start exploring immediately
2. Get Your API Key
- Log in to the HuosuAI Console
- Navigate to the "API Keys" page
- Click "Create New Key"
- Add a label for your key (e.g., "Development", "Production")
- Copy the generated API Key and store it securely
Security Notice
Your API Key is a credential for your account. Never expose it in public code repositories or share it with others. Use environment variables to manage your API Keys.
3. Make Your First API Call
HuosuAI API endpoint:
https://api.huosu.comUsing curl
curl https://api.huosu.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, please introduce yourself."}
],
"temperature": 0.7
}'Using Python
pip install openaifrom openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.huosu.com/v1"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, please introduce yourself."}
],
temperature=0.7
)
print(response.choices[0].message.content)Using Node.js
npm install openaiimport OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'YOUR_API_KEY',
baseURL: 'https://api.huosu.com/v1',
});
async function main() {
const response = await client.chat.completions.create({
model: 'gpt-4o',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Hello, please introduce yourself.' },
],
temperature: 0.7,
});
console.log(response.choices[0].message.content);
}
main();4. Replacing the Base URL
If you're migrating from OpenAI, just change two settings:
| Setting | OpenAI | HuosuAI |
|---|---|---|
| Base URL | https://api.openai.com/v1 | https://api.huosu.com/v1 |
| API Key | sk-xxx... | Your HuosuAI Key |
HuosuAI is fully compatible with OpenAI's request and response format, including Streaming, Function Calling, JSON Mode, and all other features.
TIP
HuosuAI supports not only OpenAI models but also Claude, Gemini, DeepSeek, and 40+ other models. Simply change the model parameter to switch between models — no need to change your API Key or Base URL.
Next Steps
- Read the API Documentation for complete endpoint details
- Browse Supported Models to find the right model for your use case
- Check Pricing to plan your budget
