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-key

Keep your API keys secure. Never expose them in client-side code.

API Reference

POST/v1/chat/completions

Chat Completions

Create a chat completion with the specified model

Parameters: model (required), messages (required), temperature, top_p, max_tokens, stream

GET/v1/models

List 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 CodeDescription
400Bad Request — Invalid parameters
401Unauthorized — Invalid or missing API key
404Not Found — Model or resource not found
429Rate Limited — Too many requests
500Internal Error — Server error
502Provider Error — Upstream LLM provider error