Integration

Connect Papaya to your agents in under five minutes.

Wrap your LLM or agent client once. Every request, response, tool call, and token routes through Papaya so you see exactly where spend goes — no prompts to rewrite, no infra to run.

Open dashboard

Workspace API key

papaya-lab

Live
sn_live_papaya_lab_9f3e1a27c4b8d5

One key per workspace. Every call is tagged so usage, spend, and billing roll up to the right customer automatically.

Step 1

Install the SDK

Python
pip install papaya

Pick your runtime — Python, TypeScript, or Go. More languages on request.

Step 2

Set your API key

env
export PAPAYA_API_KEY="sn_live_papaya_lab_9f3e1a27c4b8d5"

Stored once as an environment variable. Rotate any time from this page.

Step 3

Wrap your client

1 line
client = papaya.wrap(your_llm_client)

Works with OpenAI, Anthropic, LangChain, Vercel AI SDK, and any HTTP client.

Sample integration

Wrap your agent — every call reaches Papaya

OpenAI · Anthropic · LangChain · LlamaIndex · custom clients
import os
from openai import OpenAI
from papaya import Papaya

papaya = Papaya(api_key=os.environ["PAPAYA_API_KEY"])

# Wrap any LLM or agent client once — every call is captured.
client = papaya.wrap(OpenAI())

response = client.chat.completions.create(
    model="gpt-4.1",
    messages=[{"role": "user", "content": "Summarize this week's support tickets."}],
)

Supported integrations

Works with the stack you already ship

OpenAI

Chat Completions, Responses API, tools, streaming, function calling.

Supported

Anthropic

Messages API including extended thinking, tool use, and prompt caching.

Supported

LangChain / LlamaIndex

Agents, chains, retrievers — instrumented through one callback.

Supported

Vercel AI SDK

Drop-in wrapper for generateText, streamText, and tool calls.

Supported

Custom HTTP client

Drop-in fetch wrapper for in-house models or internal proxies.

Supported

Agent frameworks

CrewAI, AutoGen, Mastra — anything that routes through one SDK.

Supported

What Papaya sees

Everything needed to attribute cost and waste

Prompts and responses

per call

Tool calls and agent steps

every hop

Model, tokens, latency, retries

per request

Workflow and run identifiers

for roll-ups

Workspace and environment tags

for billing

Redaction and sampling

from Settings

Verify

Send one request, see it in the dashboard

Usually under a minute

After the first wrapped call, your workspace lights up with live traces. If nothing appears within 60 seconds, double-check that PAPAYA_API_KEY matches the key above.