Documentation

Everything you need to integrate PrismAI into your applications.

Quick Start

Get up and running with PrismAI in under 5 minutes. PrismAI is fully compatible with the OpenAI SDK — just change the base URL.

1. Get your API key

Sign up and create an API key from the dashboard. Your key starts with sk-prismai-.

2. Make your first request (cURL)

curl https://api.prismai.dev/llm/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

3. Or use the OpenAI SDK (TypeScript)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.prismai.dev/llm/v1",
  apiKey: process.env.PRISMAI_API_KEY,
});

const res = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello!" }],
});

console.log(res.choices[0].message.content);

4. Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.prismai.dev/llm/v1",
    api_key="YOUR_API_KEY",
)

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)

print(response.choices[0].message.content)

Authentication

All API requests require a valid API key passed in the Authorization header.

Authorization: Bearer sk-prismai-...

Create API keys in Dashboard → API Keys. Each key is shown only once upon creation.

Revoke compromised keys immediately from the dashboard. Revoked keys return 401.

API keys are hashed with SHA-256. We never store plaintext keys.

API Reference

PrismAI provides an OpenAI-compatible API. Use the same request format as OpenAI, plus native Anthropic passthrough.

POST/llm/v1/chat/completions

Create a chat completion. Supports all OpenAI-compatible parameters including streaming.

Parameters

modelRequired. The model ID (e.g. gpt-4o, claude-sonnet-4-6, gemini-2.5-pro).
messagesRequired. Array of message objects with role and content.
streamOptional. Set to true for streaming responses via SSE.
temperatureOptional. Sampling temperature between 0 and 2.
POST/llm/anthropic/v1/messages

Native Anthropic Messages API passthrough. Use the exact same format as the Anthropic API.

GET/llm/v1/models

List all available models with pricing, context window, and capability information.

Supported Models

PrismAI supports 100+ models across major providers. Here are the most popular ones:

OpenAI

gpt-4o, gpt-4o-mini, o1, o3

Anthropic

claude-opus-4-6, claude-sonnet-4-6, claude-haiku-4-5

Google

gemini-2.5-pro, gemini-2.5-flash

DeepSeek

deepseek-chat, deepseek-reasoner

Meta

llama-4-maverick, llama-4-scout

Mistral

mistral-large, mistral-medium

View the full list on the Models page.

Credits & Billing

PrismAI uses a credit-based billing system. Credits are consumed based on the upstream cost of each API call.

  • Credits are managed at the organization level. All members share the org balance.
  • Each API call deducts credits based on actual token usage and model pricing.
  • Credits never expire. Purchase once, use anytime.
  • Top up credits from Dashboard → Settings → Billing.

Rate Limits

Rate limits are applied per API key to ensure fair usage.

TierRequests / minTokens / min
Free1040,000
Starter60200,000
Pro3001,000,000