Using the API
Using the API
Endpoints, streaming, and where to find the full reference.
The primary surface is OpenAI-compatible under https://linkex.ai/v1. If your tool speaks OpenAI, it speaks Linkex.
Core endpoints
| Endpoint | Purpose |
|---|---|
GET /v1/models | Models available to your key |
POST /v1/chat/completions | Chat (streaming and non-streaming) |
POST /v1/responses | OpenAI Responses format |
POST /v1/embeddings | Embeddings |
POST /v1/images/generations | Image generation |
POST /v1/audio/... | Speech, transcription, translation |
POST /v1/messages | Anthropic Messages format |
/v1beta/models/... | Gemini format |
POST /v1/rerank | Rerank |
video routes (/v1/videos, /kling/..., /jimeng/...) | Video generation |
The API reference documents every route with schemas, generated from the gateway's OpenAPI spec.
Streaming
Pass "stream": true — responses arrive as standard OpenAI SSE chunks. Server-side idle timeout is generous (10 minutes) to accommodate long generations.
curl -N https://linkex.ai/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-4o", "stream": true, "messages": [{"role":"user","content":"hi"}]}'