API documentation
Every model uses the same key and base URL. Text and embeddings follow the OpenAI API format. Video runs as an async job.
Start here
Video API quickstart
Submit a job, poll it, download the MP4. Runs free in the sandbox.
Open guideText and embeddings
Chat completions and embeddings in the OpenAI format, enabled per workspace during early access.
Base URL and keys
Create a key in the console once your workspace is approved. The secret is shown once; sandbox keys start with vck_test_. Send it as a bearer token and never put it in a URL, browser code or logs.
export VISTARA_BASE_URL="https://<your-workspace-host>"
export VISTARA_API_KEY="<paste from console>" # never commit or log thisOpenAI SDKs
Create an OpenAI client with the Vistara base URL and your Vistara key, then call models by their Vistara ID.
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["VISTARA_BASE_URL"] + "/v1", # 1. base URL
api_key=os.environ["VISTARA_API_KEY"], # 2. key
)Endpoints
| Endpoint | Method | What it does | Status |
|---|---|---|---|
| /v1/videos | POST | Submit a video job (requires Idempotency-Key) | Preview |
| /v1/videos/{id} | GET | Job status and a signed output link | Preview |
| /v1/chat/completions | POST | Chat completions, streaming or not | Early access |
| /v1/embeddings | POST | Text embeddings | Early access |
| /v1/models | GET | Models available to your workspace | Early access |
Errors
Errors use one shape everywhere: {"error": {"code", "message", "details?"}}. Codes never change meaning. A request over a rate limit returns 429 with Retry-After in seconds.
The full list of codes, idempotency rules and polling limits is in the video quickstart.