API Endpoints
The public API exposes model discovery plus OpenAI-compatible, Gemini-compatible and Anthropic-compatible generation routes.
Core text generation
/v1/chat/completionsOpenAI-compatible chat completions with optional streaming.
/v1/responsesOpenAI Responses-compatible input, instructions and tools through the same billing layer.
/v1/models/{model}:generateContentGemini-compatible non-streaming generation. The {model} path segment is the Prismatic public model ID.
/v1beta/models/{model}:generateContentBeta-version Gemini-compatible non-streaming generation for clients that target the v1beta Gemini surface.
/v1/models/{model}:streamGenerateContentGemini-compatible SSE streaming. Do not set stream: true on generateContent; use this endpoint instead.
/v1beta/models/{model}:streamGenerateContentBeta-version Gemini-compatible SSE streaming for clients that target the v1beta Gemini surface.
/v1/images/generationsOpenAI-compatible image generation. Prismatic requires model so routing, plan access and billing are explicit.
/v1/videosOpenAI-compatible video generation. Prismatic requires model and routes only to providers marked with video support.
/v1/messagesAnthropic-compatible Messages endpoint for Claude-native clients and coding agents.
Models and token estimates
/v1/modelsReturns enabled public model IDs and metadata in the shape expected by the request protocol. A single canonical model can appear under multiple public IDs when aliases are configured.
/v1/models/{model_id}Returns one enabled model by public ID or model_not_found when unavailable.
/v1/messages/count_tokensEstimates input tokens for an Anthropic-style Messages payload before generation.
Account
Read the authenticated account's quota and wallet balance with the same API key used for generation.
/v1/account/quotaReturns the account's subscription quota windows (5h / 7d rolling, or the daily window for daily-mode plans) with limit / used / remaining and reset times, plus the PAYG wallet balance in USD. plan, windows and daily are null when the account has no active subscription.
curl https://api.prismaticapi.com/v1/account/quota \ -H "Authorization: Bearer $PRISMATIC_API_KEY"
Image generation example
Use an image-capable public model ID from GET /v1/models. The request consumes subscription quota or PAYG through the same billing checks as text generation.
curl https://api.prismaticapi.com/v1/images/generations -H "Authorization: Bearer $PRISMATIC_API_KEY" -H "Content-Type: application/json" -d '{
"model": "imagen-4",
"prompt": "A clean product mockup on a neutral desk",
"image_url": ["https://example.com/reference.png"],
"negative_prompt": "clutter, text artifacts",
"aspect_ratio": "16:9",
"quality": "high",
"style": "natural",
"seed": 42,
"response_format": "b64_json",
"n": 1
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.PRISMATIC_API_KEY,
baseURL: "https://api.prismaticapi.com/v1"
});
const image = await client.images.generate({
model: "imagen-4",
prompt: "A clean product mockup on a neutral desk",
image_url: "https://example.com/reference.png",
negative_prompt: "clutter, text artifacts",
aspect_ratio: "16:9",
quality: "high",
style: "natural",
seed: 42,
response_format: "b64_json",
n: 1
});Other surfaces
- Audio, embeddings and moderation endpoints are not part of Prismatic v1 yet.
- Do not configure clients to call unsupported routes until they are exposed by the API.
- The dashboard remains the source of truth for account usage and billing views.