Skip to main content
Prism accepts OpenAI Chat Completions requests at https://api.prisminference.com/v1. You need a Prism API key and a public model ID.

Send your first request

1

Set your API key

Store the key in your server-side secret manager. Do not commit it or expose it to browser code.
2

Call a model

Install the OpenAI client with npm install openai or pip install openai.
3

Read the completion

The endpoint returns a standard Chat Completions response:
Assistant text is in choices[0].message.content. Token counts are in usage.

Stream tokens

Pass stream: true to receive incremental Chat Completions chunks:

Use the Anthropic format

Prism also accepts Anthropic Messages requests. Point an Anthropic client at https://api.prisminference.com without the /v1 suffix:

Next steps

Choose a model

Compare the public model IDs and context windows.

Stream responses

Handle chunks, usage, disconnects, and retries.

Call tools

Run the OpenAI or Anthropic tool-use loop.

Return JSON

Constrain model output to valid JSON or a schema.
Last modified on September 9, 2026