Skip to content

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

  1. Visit HuosuAI and click "Sign Up"
  2. Register with your email address
  3. After registration, you'll receive free trial credits to start exploring immediately

2. Get Your API Key

  1. Log in to the HuosuAI Console
  2. Navigate to the "API Keys" page
  3. Click "Create New Key"
  4. Add a label for your key (e.g., "Development", "Production")
  5. 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.com

Using curl

bash
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

bash
pip install openai
python
from 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

bash
npm install openai
javascript
import 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:

SettingOpenAIHuosuAI
Base URLhttps://api.openai.com/v1https://api.huosu.com/v1
API Keysk-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

Intelligent Model Aggregation Platform