Documents & media
Beyond text, VectorAxis fronts the multimodal AI APIs: audio (transcription, translation, text-to-speech), image generation and editing, files, async batches, and the Responses API, through the same gateway, the same one-line auth, and the same billing, limits, and logs as your chat traffic. The endpoints are OpenAI-compatible, so an OpenAI SDK works by just pointing it at VectorAxis.
from openai import OpenAI # Point any OpenAI SDK at VectorAxis and use a virtual key as the api_key. client = OpenAI(base_url="https://api.vectoraxis.ai/v1", api_key="vk-1a2b3c4d5e6f7a8b.Xk3pQ9vN2mR7tY1wZ8bC4dF6gH0jK5lM3nP7qS9uV2w")
• OpenAI SDK: set base_url to https://api.vectoraxis.ai/v1 (with /v1), the SDK appends the endpoint, so you call /audio/transcriptions, not the full path.
• Direct HTTP: use https://api.vectoraxis.ai as the base (without /v1) and request the full path shown below, e.g. https://api.vectoraxis.ai/v1/audio/transcriptions.
- One integration for everything. Transcribe a call, generate an image, and run a chat, all through one gateway and one key, instead of wiring up each provider separately.
- Pick the best provider per task. Use OpenAI for images, a specialist like ElevenLabs for lifelike speech, or Sarvam for Indic-language audio, without changing how your app calls them.
- Unified controls. The same virtual keys, spend caps, rate limits, and observability that govern chat also cover audio, images, and files.
Document endpoints accept either a BYOK virtual key (Authorization: Bearer vk-…) or direct provider credentials (x-provider + x-api-key).
Each modality is backed by the providers below. A request is routed to the provider of the key (or the x-provider you send); using an unsupported provider for a modality returns a clear error.
| Modality | Providers |
|---|---|
| Audio: transcription (speech → text) | OpenAI, Groq, Sarvam, ElevenLabs |
| Audio: translation (speech → English text) | OpenAI, Sarvam |
| Audio: text-to-speech | OpenAI, ElevenLabs, Sarvam |
| Streaming transcription | OpenAI |
| Images: generation & editing | OpenAI |
| Files | OpenAI |
| Batches | OpenAI |
| Responses API | Every provider (stored responses: OpenAI); see Responses API |
Audio
Three operations, all OpenAI-compatible. Transcription and translation take an audio file (multipart upload); text-to-speech takes text and returns audio.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/audio/transcriptions | Turn speech into text in its original language. Optional streaming (OpenAI). |
| POST | /v1/audio/translations | Turn speech in another language into English text. |
| POST | /v1/audio/speech | Turn text into spoken audio (choose a voice and format). |
# Transcription -> POST /v1/audio/transcriptions
client.audio.transcriptions.create(model="whisper-1", file=open("call.mp3", "rb"))
# Translation (to English) -> POST /v1/audio/translations
client.audio.translations.create(model="whisper-1", file=open("call-es.mp3", "rb"))
# Text-to-speech -> POST /v1/audio/speech
client.audio.speech.create(model="tts-1", voice="alloy", input="Hello there!")Images
Generate an image from a prompt, or edit one or more existing images (multipart upload). OpenAI.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/images/generations | Create images from a text prompt (size, quality, count). |
| POST | /v1/images/edits | Edit or extend one or more uploaded images (up to 16 with the gpt-image models) with a prompt and optional mask. |
# Generate -> POST /v1/images/generations
client.images.generate(model="gpt-image-1", prompt="a red bicycle", size="1024x1024")
# Edit -> POST /v1/images/edits
client.images.edit(model="gpt-image-1", image=open("photo.png", "rb"), prompt="add a sunset")
# Edit from several images (gpt-image models) -> POST /v1/images/edits
client.images.edit(
model="gpt-image-1",
image=[open("shirt.png", "rb"), open("logo.png", "rb")],
prompt="put the logo on the shirt",
)Files
Upload and manage files used by batches and the Responses API. OpenAI.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/files | Upload a file (multipart). Returns a vxf-… id. |
| GET | /v1/files | List your files. |
| GET | /v1/files/{id} | Fetch a file’s metadata. |
| DELETE | /v1/files/{id} | Delete a file. |
| GET | /v1/files/{id}/content | Download the file’s raw content. |
# Upload -> POST /v1/files (returns a vxf-… id)
f = client.files.create(file=open("requests.jsonl", "rb"), purpose="batch")
client.files.list() # GET /v1/files
client.files.retrieve(f.id) # GET /v1/files/{id}
client.files.content(f.id) # GET /v1/files/{id}/content
client.files.delete(f.id) # DELETE /v1/files/{id}Batches
Run a large set of requests asynchronously at lower cost: upload a file of requests, start a batch, poll it, and download the results. OpenAI.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/batches | Start a batch from an uploaded input file (vxf-…). |
| GET | /v1/batches | List batches. |
| GET | /v1/batches/{id} | Check a batch’s status and progress. |
| POST | /v1/batches/{id}/cancel | Cancel an in-progress batch. |
| GET | /v1/batches/{id}/output | Download the batch results once complete. |
# Start -> POST /v1/batches
b = client.batches.create(input_file_id="vxf-...", endpoint="/v1/chat/completions",
completion_window="24h")
client.batches.list() # GET /v1/batches
client.batches.retrieve(b.id) # GET /v1/batches/{id}
client.batches.cancel(b.id) # POST /v1/batches/{id}/cancel
# Results: GET /v1/batches/{id}/outputResponses API
OpenAI’s Responses API: create a response on any provider, then retrieve or delete it and inspect its input items (stored responses are OpenAI’s). How it works on each provider, what carries over and what only OpenAI can do: Responses API.
| Method | Path | What it does |
|---|---|---|
| POST | /v1/responses | Create a response, on any provider. |
| GET | /v1/responses/{id} | Retrieve a previously created response. |
| DELETE | /v1/responses/{id} | Delete a stored response. |
| GET | /v1/responses/{id}/input_items | List the input items that produced a response. |
# Create -> POST /v1/responses
r = client.responses.create(model="gpt-4o", input="Write a haiku about the sea.")
client.responses.retrieve(r.id) # GET /v1/responses/{id}
client.responses.input_items.list(r.id) # GET /v1/responses/{id}/input_items
client.responses.delete(r.id) # DELETE /v1/responses/{id}