PieBox
Documentation

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

EnvironmentBase URL
Productionhttps://tokenhub.piegateway.me

Credential Fields

After applying through AI Hub, you will receive the following credentials:

FieldDescription
apiKeyAPI key (starts with sk-), the only credential needed for daily usage
appIdApplication ID (used for HMAC signature authentication)
appSecretApplication secret (used for HMAC signature authentication)

API Key is recommended for most use cases.

appId and appSecret are only needed for HMAC signature authentication (server-side integration scenarios).

Authentication

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.