Home

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.

Base URL#

DeploymentBase URL
Shared edge (default)https://api.hydite.com/v1
Dedicated instancehttps://<your-tenant>.hydite.com/v1
Self-hostedYour own domain

Every path is reachable both with and without the /v1 prefix (/v1/chat/completions/chat/completions), exactly matching OpenAI's behaviour.

Unified Authentication#

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 & rotationduration, 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.

Error Format#

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).


1. LLM Inference#

Chat Completions#

The core OpenAI endpoint — supports streaming, tool/function calling, JSON mode, vision, reasoning.

MethodPath
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)#

MethodPath
POST/v1/completions
POST/v1/engines/{model}/completions

Responses API#

OpenAI's stateful Responses API — multi-turn, tool calls, multimodal output.

MethodPath
POST/v1/responses
GET/v1/responses/{response_id}
DELETE/v1/responses/{response_id}
GET/v1/responses/{response_id}/input_items

Embeddings#

MethodPath
POST/v1/embeddings
POST/v1/engines/{model}/embeddings

Moderations#

MethodPath
POST/v1/moderations

Rerank#

MethodPath
POST/v1/rerank · /rerank

2. Multimodal#

Images#

MethodPathPurpose
POST/v1/images/generationsText-to-image
POST/v1/images/editsImage editing
POST/v1/images/variationsImage variations

Audio#

MethodPathPurpose
POST/v1/audio/speechText-to-speech
POST/v1/audio/transcriptionsSpeech-to-text
POST/v1/audio/translationsSpeech translation

Realtime (WebSocket)#

MethodPath
WS/v1/realtime

3. Long-running & Files#

Files#

MethodPath
POST · GET/v1/files
GET · DELETE/v1/files/{file_id}
GET/v1/files/{file_id}/content

Batches#

MethodPath
POST · GET/v1/batches
GET/v1/batches/{batch_id}
POST/v1/batches/{batch_id}/cancel

Fine-tuning#

MethodPath
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

Containers (code execution sandbox)#

MethodPath
POST · GET/v1/containers
GET · DELETE/v1/containers/{container_id}

4. Assistants & Threads#

Drop-in OpenAI Assistants v2.

MethodPath
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

5. Vector Stores (RAG)#

MethodPath
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.

MethodPath
GET/tools/list
POST/tools/call
ANY/mcp · /mcp/{server}
POST/v1/mcp/oauth/authorize
POST/v1/mcp/oauth/token

7. Models & Routing Metadata#

MethodPathPurpose
GET/v1/modelsOpenAI-compatible list visible to the key
GET/v1/models/{model_id}Single model detail
GET/v1/model/infoExtended info (price, context, capabilities)
GET/group/infoAPI Key Group info (routing / quota / model whitelist)
GET/model/metricsLatency / success metrics
GET/utils/supported_openai_paramsSupported params for a model
POST/utils/token_counterCount tokens without inference

8. Keys, Users, Teams#

Management endpoints require a master key or admin-scoped key.

Virtual Keys#

MethodPath
POST/key/generate · /key/update · /key/delete · /key/regenerate
POST/key/block · /key/unblock
GET/key/info · /key/list · /key/health

Users / Teams / Orgs#

ResourceCreateUpdateDeleteRead
UserPOST /user/newPOST /user/updatePOST /user/deleteGET /user/info · /user/list
TeamPOST /team/newPOST /team/updatePOST /team/deleteGET /team/info · /team/list
OrganizationPOST /organization/newPOST /organization/updatePOST /organization/deleteGET /organization/info · /organization/list
CustomerPOST /customer/newPOST /customer/updatePOST /customer/deleteGET /customer/info · /customer/list

Model Management#

MethodPath
POST/model/new · /model/update · /model/delete
GET/v1/model/info

Spend & Usage#

MethodPathPurpose
GET/spend/logsPer-call detail
GET/spend/tagsAggregated by tag
GET/spend/usersAggregated by user
GET/global/spendGlobal summary
GET/global/spend/reportDate-range report
GET/global/activityActivity metrics

9. Guardrails#

MethodPath
POST/guardrails/apply_guardrail
GET/guardrails/list

Or attach inline per request via "guardrails": ["pii-redact", "moderation"] in the body.

10. Health & Observability#

MethodPathPurpose
GET/healthPer-deployment health
GET/health/livelinessProcess liveness
GET/health/readinessDB / Redis readiness
GET/health/servicesUpstream provider status
GET/metricsPrometheus
GET/routesAll registered routes

Schemas#

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)

Next steps#