Documentation
Everything you need to integrate with the WuguHub API
Quick Start
Get up and running in minutes
1
Get your API key
Sign up and create an API key from your dashboard
2
Install SDK or use cURL
Use any OpenAI-compatible SDK or make direct HTTP requests
3
Make your first request
Send a chat completion request to our unified endpoint
Authentication
All API requests require authentication using a Bearer token
Authorization: Bearer hiai-your-api-keyKeep your API keys secure. Never expose them in client-side code.
API Reference
POST
/v1/chat/completionsChat Completions
Create a chat completion with the specified model
Parameters: model (required), messages (required), temperature, top_p, max_tokens, stream
GET
/v1/modelsList Models
List all available models
Terminal
curl https://api.wuguhub.com/v1/chat/completions \
-H "Authorization: Bearer hiai-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'Rate Limits
Rate limits vary by plan and are applied per API key
Check X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers
See Pricing for rate limit details by plan.
Error Codes
Standard error responses follow the OpenAI error format
| Status Code | Description |
|---|---|
| 400 | Bad Request — Invalid parameters |
| 401 | Unauthorized — Invalid or missing API key |
| 404 | Not Found — Model or resource not found |
| 429 | Rate Limited — Too many requests |
| 500 | Internal Error — Server error |
| 502 | Provider Error — Upstream LLM provider error |