All XHuoAPI APIs are served fromDocumentation Index
Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
https://api.xhuoapi.ai/v1 and authenticated via Bearer Token.
Endpoints
API Gateway
https://api.xhuoapi.ai/v1Entry point for all business calls.Developer Console
https://api.xhuoapi.aiSubscriptions, credentials, usage.Identity
https://api.xhuoapi.aiSSO and OAuth2 endpoints.Status
https://xhuoapi.aiAvailability and incident history.Obtain an API Token
Register
Sign up at platform.xhuoapi.ai.
Subscribe
Open the detail page of the service you want (Midjourney / Suno / Claude / …) and purchase a package or claim a trial.
Kinds of tokens
- Business token: created on each service page at platform.xhuoapi.ai; used to call business endpoints on
api.xhuoapi.ai. Depending on the application it is bound to, billing comes from either a per-service application (instance balance) or a general-scope application (general balance). - Platform token (prefix
platform-): for platform management APIs (accounts, subscriptions). Do NOT use for business calls.
Request headers
| Field | Required | Notes |
|---|---|---|
Authorization | Yes | Bearer prefix (mind the space) + your Token |
Content-Type | POST | application/json, UTF-8 |
Common auth / billing errors
Theerror.code values below come from PlatformGateway’s real exception definitions. The body shape is {"error": {"code": "...", "message": "..."}, "trace_id": "..."} — no success field in synchronous errors.
401 — Invalid token
error.code:
invalid_token— token is wrong or revokedtoken_expired— token has expiredtoken_mismatched— token does not belong to the requested service (e.g. service credential used on a different service)
400 — Bad request
bad_request— JSON payload is malformedno_token— missingAuthorizationheader
403 — Out of balance / blocked
used_up— instance balance and / or general balance is exhausteddisabled— credential or application is disabledforbidden— upstream content moderation rejected the request
404 — Unknown endpoint
no_api— path is not registered
429 — Rate limited
500 / 504
api_error— gateway or upstream internal errortimeout— upstream inference timed out
Security best practices
- Never hard-code the Token in browser / mobile / desktop code — always proxy through your own backend
- Store the Token in env vars or a secrets manager
- Issue distinct Tokens for dev / staging / prod
- Revoke and re-issue immediately if you suspect leakage
Next
Quickstart
Run your first request
Response format
Success & error fields
Async tasks
Polling & webhook callbacks
API reference
Interactive API docs

