GenAI¶
AI Hub GenAI API on this instance: Swagger · ReDoc · Live OpenAPI JSON
API version
GenAI API: 1.4.14
The GenAI sub-application exposes authenticated model generation through an
OpenAI-compatible Chat Completions contract. It is mounted at /genai and uses
the shared AIHub provider configuration and connectors.
Endpoints¶
| Operation | Mounted route | Purpose |
|---|---|---|
POST |
/genai/api/v1/chat/completions |
Generate a response, request JSON/schema output, use function tools or stream supported responses with SSE |
GET |
/genai/api/v1/catalogue |
Public shared providers, generation models, capabilities and database profiles; no API key or Client-ID |
GET |
/genai/api/v1/models |
Discover configured providers, generation models, capabilities and effective profile mappings with provenance and code fallbacks |
| Swagger | /genai/docs |
Inspect contracts and select concrete request examples |
| ReDoc | /genai/redocs |
Browse request and response schemas |
| OpenAPI | /genai/openapi.json |
Retrieve the machine-readable API schema |
POST /chat/completions and GET /models require an AIHub X-API-Key and,
where applicable, the authenticated client context. GET /catalogue is public
and always uses shared provider settings, without client-specific overrides. The local SDK base URL is
http://127.0.0.1:8086/genai/api/v1.
Start here¶
Read the Chat Completions and model-discovery guide for authentication, complete payloads, response formats, errors and SDK usage. It covers:
- optional
provider,modelandprofileselectors, their precedence and configured defaults; - reasoning, JSON/JSON Schema, prompt caching, sampling, token budgets and tools;
- SSE streaming, usage chunks and assembling JSON output;
- inline document inputs and extraction constraints;
- the automatically loaded public catalogue, shared profile provenance and independent code fallbacks, refreshed from MongoDB or PostgreSQL.
The Swagger examples show supported combinations of controls. Use the live catalogue to adapt those examples to the configured models and capabilities of your instance.
Shared configuration and architecture¶
Provider configuration and semantic profiles are shared with other AIHub
applications. See LLM providers, models and tasks
for configuration precedence and provider-specific behavior, and
Applications and APIs for mounting and ownership.
Non-stream generation reuses call_llm_async(); supported OpenAI/Azure streaming
retains the incremental SSE transport described in the endpoint guide.