API Reference & Unified Authentication
OpenAI-compatible endpoints — one key, every model, every provider
Hydite Vtslx AO exposes a fully OpenAI-compatible HTTP API. Point any OpenAI SDK at the Hydite base_url, swap in a Hydite virtual key, and you can drive Anthropic, Google, DeepSeek, Qwen, Zhipu, Moonshot, xAI, Mistral and dozens more — without changing a single line of code.
| Deployment | Base URL |
|---|
| Shared edge (default) | https://api.hydite.com/v1 |
| Dedicated instance | https://<your-tenant>.hydite.com/v1 |
| Self-hosted | Your own domain |
Every path is reachable both with and without the /v1 prefix (/v1/chat/completions ≡ /chat/completions), exactly matching OpenAI's behaviour.
All business endpoints expect a Bearer token in the request header:
1
Authorization: Bearer sk-hydite-xxxxxxxxxxxxxxxxxxxxxxxx
Virtual keys are issued either from the dashboard or via POST /key/generate and provide:
- Multi-provider passthrough — one key reaches every supported model.
- Quota & rate limits — per-key RPM / TPM / budget caps.
- Model whitelist — restrict a key to specific model groups or teams.
- TTL & rotation —
duration, expires, instant revoke.
- Audit trail — every call is logged and attributable by key, user, team.
Compatibility: keys starting with sk- work in Authorization: Bearer, and api-key / x-api-key headers are also accepted for legacy SDKs.
All errors follow the OpenAI shape:
1
{
2
"error": {
3
"message": "Invalid API key provided",
4
"type": "authentication_error",
5
"code": "invalid_api_key",
6
"param": null
7
}
8
}
Common codes: 401 auth, 403 forbidden, 404 model/resource missing, 429 rate-limited, 5xx upstream/gateway (auto-retried / failover per policy).
The core OpenAI endpoint — supports streaming, tool/function calling, JSON mode, vision, reasoning.
| Method | Path |
|---|
| POST | /v1/chat/completions |
| POST | /v1/engines/{model}/chat/completions |
| POST | /v1/openai/deployments/{model}/chat/completions (Azure-compatible) |
1
curl https://api.hydite.com/v1/chat/completions \
2
-H "Authorization: Bearer $HYDITE_API_KEY" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"model": "claude-sonnet-4-5",
6
"messages": [{"role": "user", "content": "hi"}],
7
"stream": true
8
}'
Key params: model, messages, stream, temperature, top_p, max_tokens, tools, tool_choice, response_format, reasoning_effort, thinking, stream_options.
Text Completions (Legacy)#
| Method | Path |
|---|
| POST | /v1/completions |
| POST | /v1/engines/{model}/completions |
OpenAI's stateful Responses API — multi-turn, tool calls, multimodal output.
| Method | Path |
|---|
| POST | /v1/responses |
| GET | /v1/responses/{response_id} |
| DELETE | /v1/responses/{response_id} |
| GET | /v1/responses/{response_id}/input_items |
| Method | Path |
|---|
| POST | /v1/embeddings |
| POST | /v1/engines/{model}/embeddings |
| Method | Path |
|---|
| POST | /v1/moderations |
| Method | Path |
|---|
| POST | /v1/rerank · /rerank |
| Method | Path | Purpose |
|---|
| POST | /v1/images/generations | Text-to-image |
| POST | /v1/images/edits | Image editing |
| POST | /v1/images/variations | Image variations |
| Method | Path | Purpose |
|---|
| POST | /v1/audio/speech | Text-to-speech |
| POST | /v1/audio/transcriptions | Speech-to-text |
| POST | /v1/audio/translations | Speech translation |
| Method | Path |
|---|
| POST · GET | /v1/files |
| GET · DELETE | /v1/files/{file_id} |
| GET | /v1/files/{file_id}/content |
| Method | Path |
|---|
| POST · GET | /v1/batches |
| GET | /v1/batches/{batch_id} |
| POST | /v1/batches/{batch_id}/cancel |
| Method | Path |
|---|
| POST · GET | /v1/fine_tuning/jobs |
| GET | /v1/fine_tuning/jobs/{job_id} |
| POST | /v1/fine_tuning/jobs/{job_id}/cancel |
| GET | /v1/fine_tuning/jobs/{job_id}/events |
| Method | Path |
|---|
| POST · GET | /v1/containers |
| GET · DELETE | /v1/containers/{container_id} |
Drop-in OpenAI Assistants v2.
| Method | Path |
|---|
| POST · GET | /v1/assistants |
| GET · POST · DELETE | /v1/assistants/{assistant_id} |
| POST | /v1/threads |
| GET · POST · DELETE | /v1/threads/{thread_id} |
| GET · POST | /v1/threads/{thread_id}/messages |
| POST | /v1/threads/{thread_id}/runs |
| Method | Path |
|---|
| POST · GET | /v1/vector_stores |
| GET · POST · DELETE | /v1/vector_stores/{vs_id} |
| POST | /v1/vector_stores/{vs_id}/search |
| POST | /v1/vector_stores/{vs_id}/files |
6. MCP (Model Context Protocol)#
Built-in MCP gateway — proxy remote MCP servers behind unified auth.
| Method | Path |
|---|
| GET | /tools/list |
| POST | /tools/call |
| ANY | /mcp · /mcp/{server} |
| POST | /v1/mcp/oauth/authorize |
| POST | /v1/mcp/oauth/token |
| Method | Path | Purpose |
|---|
| GET | /v1/models | OpenAI-compatible list visible to the key |
| GET | /v1/models/{model_id} | Single model detail |
| GET | /v1/model/info | Extended info (price, context, capabilities) |
| GET | /group/info | API Key Group info (routing / quota / model whitelist) |
| GET | /model/metrics | Latency / success metrics |
| GET | /utils/supported_openai_params | Supported params for a model |
| POST | /utils/token_counter | Count tokens without inference |
Management endpoints require a master key or admin-scoped key.
| Method | Path |
|---|
| POST | /key/generate · /key/update · /key/delete · /key/regenerate |
| POST | /key/block · /key/unblock |
| GET | /key/info · /key/list · /key/health |
| Resource | Create | Update | Delete | Read |
|---|
| User | POST /user/new | POST /user/update | POST /user/delete | GET /user/info · /user/list |
| Team | POST /team/new | POST /team/update | POST /team/delete | GET /team/info · /team/list |
| Organization | POST /organization/new | POST /organization/update | POST /organization/delete | GET /organization/info · /organization/list |
| Customer | POST /customer/new | POST /customer/update | POST /customer/delete | GET /customer/info · /customer/list |
| Method | Path |
|---|
| POST | /model/new · /model/update · /model/delete |
| GET | /v1/model/info |
| Method | Path | Purpose |
|---|
| GET | /spend/logs | Per-call detail |
| GET | /spend/tags | Aggregated by tag |
| GET | /spend/users | Aggregated by user |
| GET | /global/spend | Global summary |
| GET | /global/spend/report | Date-range report |
| GET | /global/activity | Activity metrics |
| Method | Path |
|---|
| POST | /guardrails/apply_guardrail |
| GET | /guardrails/list |
Or attach inline per request via "guardrails": ["pii-redact", "moderation"] in the body.
| Method | Path | Purpose |
|---|
| GET | /health | Per-deployment health |
| GET | /health/liveliness | Process liveness |
| GET | /health/readiness | DB / Redis readiness |
| GET | /health/services | Upstream provider status |
| GET | /metrics | Prometheus |
| GET | /routes | All registered routes |
Every request/response body follows the official OpenAI OpenAPI 3.1 schema, so the TypedDict / Pydantic / TS types from openai-python, openai-node and openai-go work as-is. Provider-specific extensions (Anthropic thinking, Google safety_settings, …) are passed through transparently — just include them in the request body and the gateway forwards them to the right backend.
Machine-readable contracts:
GET /openapi.json — full OpenAPI 3.1 spec for the running instance
GET /docs — interactive Swagger UI (when EXPOSE_DOCS is enabled)