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
2
Call a model
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
Passstream: true to receive incremental Chat Completions chunks:
Use the Anthropic format
Prism also accepts Anthropic Messages requests. Point an Anthropic client athttps://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.