Getting Started
AI Hub API overview, service endpoints, and authentication
AI Hub provides a unified AI API, including:
- LLM Chat Completions — Fully compatible with the OpenAI format. You can use the official OpenAI SDK (Python / Node.js / Go, etc.) directly.
- Integration Services — Image generation, video generation, text-to-speech, speech-to-text, web search, and more.
After obtaining your API Key, follow this guide to get started. For LLM endpoints, simply change base_url and api_key. Integration services are called via REST API.
Service Endpoints & Credentials
Base URL
| Environment | Base URL |
|---|---|
| Production | https://tokenhub.piegateway.me |
Credential Fields
After applying through AI Hub, you will receive the following credentials:
| Field | Description |
|---|---|
apiKey | API key (starts with sk-), the only credential needed for daily usage |
appId | Application ID (used for HMAC signature authentication) |
appSecret | Application secret (used for HMAC signature authentication) |
API Key is recommended for most use cases.
appIdandappSecretare only needed for HMAC signature authentication (server-side integration scenarios).
Authentication
API Key (Recommended)
Add one of the following headers to your request:
X-API-Key Header (Recommended):
X-API-Key: <your-api-key>Authorization Header:
Authorization: Bearer <your-api-key>HMAC-SHA256 Signature Authentication
For server-side integration with higher security. See the "HMAC-SHA256 Authentication" documentation for details.