canonical: https://jentic.com/apis/prisminference.com/prisminference

# Prism Inference API

The Prism Inference API serves language model inference behind three wire formats at once: OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages. Existing clients written for either provider can point at the Prism host and send the same model and messages payloads, with streaming, tool calling, response_format, and reasoning or thinking controls where each format supports them. A token-counting route sizes Anthropic-style requests before sending, and public model routes list and describe the models available.

## For AI agents

Run chat completions, Responses API calls, or Anthropic-style messages against Prism-hosted models with one credential, and count input tokens before sending.

## Scope

Does not fine-tune models, generate embeddings, or create images or audio. Use for text generation through OpenAI- and Anthropic-compatible routes only.

## Capabilities

- Generate chat completions in OpenAI Chat Completions format with model, messages, tools, and response_format
- Create responses in OpenAI Responses format with instructions, previous_response_id chaining, and background runs
- Send Anthropic Messages format requests with system, max_tokens, tools, and thinking settings
- Count input tokens for an Anthropic-style messages request before sending it
- List available models and retrieve a single model's details without authentication
- Stream generated output as it is produced across the chat, responses, and messages formats

## Use cases

### Agent model calls through one gateway

An AI agent that delegates sub-tasks to a language model can call Prism without its own client library. Through Jentic the agent searches for 'create a chat completion', loads createChatCompletion with its input schema, and sends model and messages, with the credential injected at call time. Because Prism also speaks the Anthropic Messages and OpenAI Responses formats, the agent can use whichever request shape its prompts were written for.

Example prompt: GET `/v1/models` to pick a model id, then POST `/v1/chat/completions` with that model and a messages array containing a user message asking for a three-line summary

### Drop-in provider switch for existing apps

An application built on the OpenAI or Anthropic SDK can move its traffic to Prism by changing the base URL, since the request bodies follow the same formats. Chat Completions calls require model and messages, Responses calls require model and input, and Messages calls require model, max_tokens, messages, and the anthropic-version header, so existing payloads carry over.

Example prompt: POST `/v1/messages` with anthropic-version '2023-06-01', a model id, max_tokens 512, and a messages array, and compare the output with the same prompt sent to `/v1/chat/completions`

### Token budgeting before a long prompt

Long-context work needs to know whether a prompt fits before spending on generation. countMessageTokens takes the same model, messages, system, and tools fields as a Messages request and returns the input token count, so a pipeline can trim or split documents before calling createMessage.

Example prompt: POST `/v1/messages/count_tokens` with a model id, a system prompt, and a messages array holding a long document, and split the document if the count exceeds the budget

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/chat/completions` | Create a chat completion |
| POST | `/v1/responses` | Create a response |
| POST | `/v1/messages` | Create a message |
| POST | `/v1/messages/count_tokens` | Count message input tokens |
| GET | `/v1/models` | List models |
| GET | `/v1/models/{model}` | Retrieve a model |

## Key resources

- **Chat completions** — OpenAI Chat Completions format generation with tools, streaming, and response_format
- **Responses** — OpenAI Responses format generation with instructions, chaining, and background runs
- **Messages** — Anthropic Messages format generation and input token counting
- **Models** — Public listing and detail routes for the models Prism serves

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 58 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 75 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 40 / 100
  - Agent Usability: 94 / 100
  - Security: 55 / 100
  - AI Discoverability: 54 / 100
- **View full report:** https://jentic.com/apis/prisminference.com/prisminference/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Prism by hand means picking between bearer and x-api-key auth, setting the anthropic-version header on Messages calls, and handling three different request and streaming formats. Through Jentic you install once, import Prism Inference from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Prism separates its formats by route (`/v1/chat/completions`, `/v1/responses`, `/v1/messages`), and the model is chosen in the request body, so rules bound which routes your agent may call rather than which model it uses. You choose the operations, so the agent can be limited to one format plus the public model listing.
- **Credential handling:** Your Prism key is stored once, encrypted, by your own Jentic One instance and injected into the request at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a chat completion' or 'count prompt tokens', and Jentic returns the matching Prism operation with its input schema, including the required model and messages fields, so the agent calls the right endpoint directly.

## Related APIs

- **OpenRouter** — OpenAI-compatible gateway routing requests to many model providers
- **Groq** — OpenAI-compatible inference on its own hardware
- **Anthropic Messages** — The original Anthropic Messages API for Claude models
- **Langfuse** — LLM observability for tracing prompts, outputs, and costs

## FAQ

### What authentication does the Prism Inference API use?

Per its OpenAPI spec, the Prism Inference API accepts either a bearer token in the Authorization header or an API key in the x-api-key header on its generation and token-counting routes. The API information, health, and model listing routes are public endpoints that need no credential. Through Jentic the credential is held by your own instance and attached at call time.

### Can I use the Anthropic Messages format with the Prism Inference API?

Yes. POST `/v1/messages` accepts the Anthropic Messages shape with model, max_tokens, and messages required, plus optional system, tools, tool_choice, and thinking, and it requires the anthropic-version header, which defaults to 2023-06-01. POST `/v1/messages/count_tokens` counts input tokens for the same shape.

### What are the rate limits for the Prism Inference API?

The OpenAPI spec does not specify rate limits. Check the Prism documentation at https://docs.prisminference.com for current limits per account.

### Is there a Prism Inference MCP server?

You don't need an MCP server to give your agent the Prism Inference API. Jentic connects it directly from the API Directory: import it, store your key once, and your agent calls the completion and messages operations on demand without loading another server's tool definitions into its context.

### How do I run a chat completion through Jentic with the Prism Inference API?

Search Jentic for 'create a chat completion', load createChatCompletion, and execute it with a model id from GET `/v1/models` and a messages array. Set stream to true if the agent should receive output incrementally. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Prism Inference API?

Yes. Write a rule that allows only POST `/v1/chat/completions` and GET `/v1/models`, so the agent can generate text in one format and look up models but not call the Responses or Messages routes. The model choice travels in the request body, so the rule bounds the routes, not which model is used. Every call it makes is logged for review.
