Skip to content

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

Preview

Video API quickstart

Submit a job, poll it, download the MP4. Runs free in the sandbox.

Open guide
Early access

Text 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.

shell
export VISTARA_BASE_URL="https://<your-workspace-host>"
export VISTARA_API_KEY="<paste from console>"   # never commit or log this

OpenAI SDKs

Create an OpenAI client with the Vistara base URL and your Vistara key, then call models by their Vistara ID.

Python
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

API endpoints and their availability
EndpointMethodWhat it doesStatus
/v1/videosPOSTSubmit a video job (requires Idempotency-Key)Preview
/v1/videos/{id}GETJob status and a signed output linkPreview
/v1/chat/completionsPOSTChat completions, streaming or notEarly access
/v1/embeddingsPOSTText embeddingsEarly access
/v1/modelsGETModels available to your workspaceEarly 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.