Skip to main content

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.

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:
  • 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 third API, Realtime, covers one specific need: two-way voice.

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

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.
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.
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.
Use the JSON API. Describe the output shape with a schema, and the model fills it in. Each call is independent.
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.
Use Realtime. Open a websocket, stream microphone audio in, and stream voice out.

Side by side

Chat APIJSON APIRealtime
PatternMulti-turn conversationSingle task, one shotLive audio session
Best forChatbots, agents, tool useParsing, extraction, multimodal tasksVoice agents
InputMessages with rolesAny JSON: text, image, audio, PDFAudio frames
OutputA message (text + optional tool calls)A typed JSON object matching your schemaAudio frames
Multi-turnYes, with message historyNo, each call is independentYes, live
Use your existing SDKOpenAI, Anthropic, Google AIOpper SDKAny websocket client
Base URLhttps://api.opper.ai/v3/compathttps://api.opper.ai/v3/callwss://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
You can mix APIs in one app. A common setup has the Chat API powering the user-facing conversation while the JSON API runs in the background to parse uploads or summarize context.
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.