Docs
API: OpenAI /v1
The /v1/* surface. Point any OpenAI client at the base URL (no trailing /v1) and set a placeholder key. On 127.0.0.1 no auth is required.
The /v1/* surface. Point any OpenAI client at the base URL (no trailing /v1) and set a placeholder key. On 127.0.0.1 no auth is required.
All examples use the local base URL http://127.0.0.1:1337. This page is generated from the api-endpoints.v1 contract — see Server overview for auth, CORS, and exposure, and Settings reference for the controls.
Endpoints
GET /v1/models
List installed models with rich metadata.
Returns the OpenAI model list shape, enriched with Bedrova fields (modality, quant, estimated memory, loaded state).
Auth: None on localhost; required when exposed · Streaming: no
Response. OpenAI model list, enriched with Bedrova catalog metadata. Shape: model-catalog.v1.
Example request:
curl http://127.0.0.1:1337/v1/models
Example response:
{
"object": "list",
"data": [
{ "id": "qwen35-7b-4bit", "object": "model", "owned_by": "local" }
]
}
POST /v1/chat/completions
Chat completion, streaming or not.
Standard OpenAI chat completion. Supports tool calling and response_format json_schema. Set stream: true for Server-Sent Events with [DONE] framing.
Auth: None on localhost; required when exposed · Streaming: yes (SSE)
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | Installed model id from /v1/models. |
messages | array | yes | Chat messages; supports text and, on vision models, image content blocks. |
stream | boolean | no | Stream tokens over SSE. |
temperature | number | no | Sampling temperature. |
tools | array | no | OpenAI-style tool definitions for function calling. |
response_format | object | no | Set { type: “json_schema”, json_schema: … } to force structured output. |
Response. OpenAI chat.completion (or a stream of chat.completion.chunk objects).
Example request:
curl http://127.0.0.1:1337/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen35-7b-4bit",
"messages": [{"role": "user", "content": "Hello"}]
}'
Example response:
{
"id": "chatcmpl-...",
"object": "chat.completion",
"choices": [{
"message": {"role": "assistant", "content": "Hi! How can I help?"}
}]
}
POST /v1/responses
Stateful Responses API.
OpenAI Responses-style endpoint for multi-turn, tool-using interactions.
Auth: None on localhost; required when exposed · Streaming: yes (SSE)
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | Installed model id. |
input | string | array | yes |
Response. OpenAI response object, optionally streamed.
Example request:
curl http://127.0.0.1:1337/v1/responses \
-H 'Content-Type: application/json' \
-d '{"model": "qwen35-7b-4bit", "input": "Summarize MLX in one line."}'
POST /v1/embeddings
Embed text into vectors.
Auth: None on localhost; required when exposed · Streaming: no
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | An embedding model id. |
input | string | string[] | yes |
Response. OpenAI embeddings list (one vector per input).
Example request:
curl http://127.0.0.1:1337/v1/embeddings \
-H 'Content-Type: application/json' \
-d '{"model": "nomic-embed", "input": ["first", "second"]}'
POST /v1/audio/transcriptions
Speech-to-text (Whisper-style).
Auth: None on localhost; required when exposed · Streaming: no
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | A speech-to-text model id. |
file | file | yes | Audio file (multipart/form-data). |
Response. Transcript text, with timestamps where the model supports them.
Example request:
curl http://127.0.0.1:1337/v1/audio/transcriptions \
-F model=whisper-large-v3 \
-F file=@meeting.m4a
POST /v1/audio/speech
Text-to-speech synthesis.
Auth: None on localhost; required when exposed · Streaming: yes (SSE)
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | A text-to-speech model id. |
input | string | yes | Text to synthesize. |
voice | string | no | Voice name where the model offers a choice. |
Response. Audio stream.
Example request:
curl http://127.0.0.1:1337/v1/audio/speech \
-H 'Content-Type: application/json' \
-d '{"model": "kokoro-tts", "input": "Hello from your Mac."}' --output out.wav
POST /v1/images/generations
Generate images (FLUX.1, FLUX.2 Klein, Qwen Image and other bundled families).
Auth: None on localhost; required when exposed · Streaming: yes (SSE)
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | An image model id. |
prompt | string | yes | Text prompt. |
size | string | no | Output dimensions, e.g. 1024x1024. |
Response. Generated image(s); progress can stream.
Example request:
curl http://127.0.0.1:1337/v1/images/generations \
-H 'Content-Type: application/json' \
-d '{"model": "flux1-schnell", "prompt": "a rover dog, side profile, rust coat"}'