Opper has three APIs. Most apps only need one. This page helps you pick. The main distinction is between the Chat API and the JSON API:Documentation Index
Fetch the complete documentation index at: https://docs.opper.ai/llms.txt
Use this file to discover all available pages before exploring further.
- The Chat API is the classic chat pattern: messages with roles, multi-turn conversation, tool calling. Use it for chatbots, assistants, and agentic workflows.
- The JSON API is for single, well-defined tasks. You send an input and get a structured output. Use it to parse a receipt, extract fields from a contract, classify a support ticket, or any multimodal job where you describe what you want back.
The three APIs
Chat API
Chatbots, assistants, agents. Messages, tools, multi-turn. Works with the OpenAI, Anthropic, and Google AI SDKs you already use.
JSON API
One task, one answer. Send any input (text, image, audio, PDF), get a typed JSON object back. Built for parsing, extraction, and classification.
Realtime
For voice. Your user speaks, the model speaks back.
Pick by what you’re building
I'm building a chatbot or assistant
I'm building a chatbot or assistant
Use the Chat API. It handles multi-turn conversations, tool calling, and image inputs out of the box, and you can use the OpenAI, Anthropic, or Google AI SDK you already know.
I'm building an agent that calls tools
I'm building an agent that calls tools
Use the Chat API. The classic
tools array works the same way the OpenAI and Anthropic SDKs do it, but routed through any of Opper’s 300+ models.I'm parsing receipts, invoices, PDFs, or images
I'm parsing receipts, invoices, PDFs, or images
Use the JSON API. Send the file in the input, describe the fields you want, and get a clean JSON object back. There’s no chat loop and no message history to manage.
I'm extracting structured data or classifying things
I'm extracting structured data or classifying things
Use the JSON API. Describe the output shape with a schema, and the model fills it in. Each call is independent.
I'm migrating an existing OpenAI / Anthropic / Gemini app
I'm migrating an existing OpenAI / Anthropic / Gemini app
Use the Chat API. Change the base URL and the API key, and your code keeps working. You get Opper’s observability and Control Plane rules along with it.
I'm building a voice agent
I'm building a voice agent
Use Realtime. Open a websocket, stream microphone audio in, and stream voice out.
Side by side
| Chat API | JSON API | Realtime | |
|---|---|---|---|
| Pattern | Multi-turn conversation | Single task, one shot | Live audio session |
| Best for | Chatbots, agents, tool use | Parsing, extraction, multimodal tasks | Voice agents |
| Input | Messages with roles | Any JSON: text, image, audio, PDF | Audio frames |
| Output | A message (text + optional tool calls) | A typed JSON object matching your schema | Audio frames |
| Multi-turn | Yes, with message history | No, each call is independent | Yes, live |
| Use your existing SDK | OpenAI, Anthropic, Google AI | Opper SDK | Any websocket client |
| Base URL | https://api.opper.ai/v3/compat | https://api.opper.ai/v3/call | wss://api.opper.ai/v3/realtime |
What’s the same across all three
Whichever API you pick:- You can use any of the 300+ models Opper supports
- Your Control Plane rules apply automatically
- Every call shows up in your traces and generation history
- Your API key is the same
Not sure where to start? If your app talks to a user back-and-forth, use the Chat API. If your app does one job per request, use the JSON API.