Skip to content

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)

FieldTypeRequiredNotes
modelstringyesInstalled model id from /v1/models.
messagesarrayyesChat messages; supports text and, on vision models, image content blocks.
streambooleannoStream tokens over SSE.
temperaturenumbernoSampling temperature.
toolsarraynoOpenAI-style tool definitions for function calling.
response_formatobjectnoSet { 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)

FieldTypeRequiredNotes
modelstringyesInstalled model id.
inputstringarrayyes

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

FieldTypeRequiredNotes
modelstringyesAn embedding model id.
inputstringstring[]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

FieldTypeRequiredNotes
modelstringyesA speech-to-text model id.
filefileyesAudio 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)

FieldTypeRequiredNotes
modelstringyesA text-to-speech model id.
inputstringyesText to synthesize.
voicestringnoVoice 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)

FieldTypeRequiredNotes
modelstringyesAn image model id.
promptstringyesText prompt.
sizestringnoOutput 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"}'