Two endpoints. OpenAI-compat shape.
All paths live under /v1. Request and response bodies follow the OpenAI v1 spec; SLASHED proxies the upstream model's contract. If the OpenAI SDK or any third-party OpenAI-compatible library can call OpenAI, it can call SLASHED with a one-string base-URL swap.
https://api.slashed.pro/v1. Anything else under /v1/* returns 405 Method Not Allowed or 404 Not Found — expand carefully.
01Endpoint summary
| Method | Path | Auth | Purpose |
|---|---|---|---|
| POST | /v1/chat/completions | Bearer sl- | Chat completion. Streaming, tool use, vision per upstream model capability. |
| GET | /v1/models | None | List of all routed models. Returns OpenAI-spec list shape. |
02POST /v1/chat/completions
Single chat completion. Same body shape as api.openai.com/v1/chat/completions. The model field selects the upstream provider; SLASHED routes accordingly.
Authorization: Bearer sl-...— see /docs/authenticationContent-Type: application/json
model— One of the IDs in /docs/models.messages— Array of{role, content}. Same shape as OpenAI.
stream(boolean) — Iftrue, returns Server-Sent Events. See §03 below.tools(array) — Function-calling tool specs. Same shape as OpenAI tool-use. Forwarded as upstream supports it.tool_choice(string | object) —"auto","none", or a forced selector.temperature,top_p,max_tokens,stop,seed,response_format— standard sampling controls. Forwarded as upstream supports.
03Streaming
Set "stream": true in the request body. The response is Server-Sent Events. Each data: line is a JSON object with the same delta shape as OpenAI's chat.completion.chunk. The stream terminates with data: [DONE].
The OpenAI Python SDK consumes this transparently — for chunk in client.chat.completions.create(..., stream=True) works.
04Tool use
Pass an OpenAI-spec tools array. The gateway forwards the array unchanged to the upstream provider. When the upstream model emits a tool-call, the gateway returns it in choices[0].message.tool_calls as in OpenAI's contract.
Multi-turn tool use follows the OpenAI pattern: append the assistant message containing tool_calls, then append a {"role": "tool", "tool_call_id": "...", "content": "..."} message and re-request.
05Vision
For vision-capable models (see /docs/models), use the OpenAI content-array shape:
Both remote URLs and inline base64 data-URIs are documented as accepted. Image-size limits follow the upstream provider's posted limits.
06GET /v1/models
Public listing of all model IDs the gateway routes to. No authentication required. See /docs/models for the documented data on each entry.
Returns OpenAI-spec { "object": "list", "data": [...] } shape. Each entry has id, object, created (0 today), and owned_by.
07What's not documented yet
- No
/v1/embeddingsdocumented today. If you need vector embeddings, route them direct to the upstream provider for now. - No
/v1/completions(legacy) documented. Use the chat-completion shape with a single user message instead. - No
/v1/files//v1/audio/*//v1/images/*. The gateway is text-and-vision-chat-only today. - No
/v1/usagedocumented. Use the dashboard ledger. - No
/v1/healthdocumented. Monitor status.slashed.pro instead.