AIHubMix API Documentation and Developer Resources
AIHubMix OpenAPI specification, authentication, model discovery and agent onboarding resources.
Start an integration
Create an API key in the AIHubMix console and store it in an environment variable. Choose a real model ID from the public catalog, read its capabilities and integration guide, then use the wire protocol supported by your SDK. Chat Completions and Responses use Authorization: Bearer; Messages uses x-api-key; Gemini uses x-goog-api-key. Check the response body as well as the status code when verifying your first call. Never embed API keys in frontend code or public repositories.
Self-service onboarding and free models
Key creation is self-service: sign in to the console, open its API key page, and issue a key without contacting sales. The same screen restricts a key to an allowed model list, an IP or CIDR allowlist, a spend cap and an expiry date; those restrictions are the enforceable least-privilege control today, and there are no named OAuth scopes. The free model catalog publishes current availability and per-model limits, and the free quota configuration endpoint returns the live trial allowance, per-minute and daily request and token limits, and the per-model request weights the gateway enforces. Read those numbers from the endpoint rather than copying them, because operations changes them.
Testing before you pay
Free models on the production base URL are the supported test path; there is no separate sandbox host and no mock API. The Playground provides an interactive way to try a model before writing code. Review the selected model pricing before sending paid requests. Access can still depend on your account state and key settings, and no trial credit amount is promised here.
Errors and retries
For API error formats and trace IDs, use the HTTP status documentation linked below. Failures return a JSON body with an error object rather than an HTML page; it always carries a message, and a machine-readable code where the error source supplies one. Errors also carry a trace id, so quote it when reporting a problem instead of relying on the status line alone. On 429, honor Retry-After when supplied; it can be a delay in seconds or an HTTP date. Otherwise use bounded exponential backoff with jitter. Rate-limit headers, when present, come from the API gateway and follow the IETF RateLimit header fields draft: RateLimit-Policy names the active policy with its quota q and window w in seconds, and RateLimit reports the remaining requests r and the seconds t until the window resets. They describe the gateway request limiter for that endpoint, not your account balance or a model token budget. Do not assume that missing quota headers mean unlimited capacity. Avoid blindly replaying generation requests after ambiguous failures, because a request may already have incurred usage.
API versions and model retirement
Use the exact versioned paths declared by the OpenAPI specification, including /v1 and the Gemini /gemini/v1beta endpoints. API versioning and model lifecycle are separate: a versioned endpoint can remain available while a particular model is retired. Read the model retirement index and model guide for announced retirement dates and successors. An id removed from the website catalog may return 410 Gone. No fixed API deprecation notice period is promised here; confirm migration requirements with support before relying on one.
Resources
- AIHubMix API documentation
- Self-service API key management
- AIHubMix API versioning and deprecation policy
- Quick start and API key setup
- AIHubMix OpenAPI specification
- Agent onboarding and authentication
- When to use AIHubMix
- Free model catalog
- Live free-tier limits (JSON)
- Model retirement index
- HTTP status and error reference
- AIHubMix Playground