proxy-first api edge

Cut token costs
by 50–90%

Drop PAIRL in front of your existing AI stack — no rewrites, no provider change, no migration risk. We measure the savings on every request, from day one.

1 line changed0 migrationsbyok — your keys, your models
pairl compilerlive
natural language · 2,330 tokens
Support: Hi Alex, thanks for reaching out. I see you're writing from the Acme production account. How can I help today? Customer: Hi, since yesterday morning our Atlas CRM integration with Stripe has been dropping invoice records. About 30 percent of new invoices never make it into the CRM. This is blocking our monthly close tomorrow, so I really need this resolved quickly. My finance team is already asking why the numbers do not match Stripe. Support: I understand the urgency. Let me pull up your workspace and check the integration health. Can you confirm the workspace ID and the Stripe account you're connected to? Also, roughly when did you first notice the discrepancy? Customer: Workspace ID is wsp_acme_prod_8841. We're on the Enterprise plan. The Stripe account is acct_1HjKLmn, connected via OAuth about eight months ago. The integration was set up by our former platform engineer, Maria, and has been running without issues until now. I first noticed the missing records this morning when our reconciliation report showed a gap, but the webhook logs suggest the failures started yesterday. Support: Got it. I can see the connection in our gateway. Let me check the event stream. Looking at the webhook event log, I notice a clear pattern. Starting at 06:14 UTC yesterday, Stripe events of type invoice.finalized began returning HTTP 422 from your CRM endpoint. Before that timestamp, they were returning HTTP 200 consistently. There is no elevated latency, just a clean switch from success to validation failure. Did anything change in your Stripe configuration or in your customer defaults around 06:10 to 06:15 UTC yesterday? Customer: Yes, we changed the default currency for new customers from EUR to USD. The deployment went out at 06:10 UTC. We did not think it would affect the CRM because the integration has handled multi-currency invoices before, both in euros and in pounds, and those records were always created successfully. Support: That explains the timing almost perfectly. The CRM's invoice validation is strict about currency formatting. It expects uppercase ISO 4217 codes such as USD, EUR, or GBP. If Stripe is now sending a lowercase code like "usd" inside the invoice object, the validator rejects the payload with a 422 and the record is not written. Can you check a recent failed webhook payload for the exact value of the currency field? Customer: Let me pull one from the Stripe dashboard. Here is a snippet from an event that failed at 09:47 UTC today: "object": "invoice", "id": "in_0NqrStuVw", "currency": "usd", "amount_due": 14900, "customer": "cus_AbcDef123". And here is one from the day before the change: "currency": "EUR". So it is definitely a case issue. Support: Exactly. The root cause is a case mismatch between Stripe's lowercase currency code and the CRM's uppercase validator. This is a known friction point with some billing providers, especially when defaults are changed programmatically. The good news is that it is straightforward to fix on either side. You can configure Stripe to send uppercase codes, add a normalization step in your middleware, or we can relax the validator on our end so it accepts lowercase and normalizes internally. Customer: What's the fastest path? I need the missing invoices in the CRM before our monthly close tomorrow afternoon. We are also supposed to send customer statements next week, and I do not want any invoices to be missing from the CRM when those run. Support: The fastest path is to add a one-line normalization in your middleware that uppercases the currency code before forwarding it to the CRM. That can be deployed today without waiting for our release cycle. The long-term, cleaner fix is for us to make the CRM validator case-insensitive, which I will escalate to our engineering team right now. I will also open an internal ticket to track the schema relaxation so you can follow progress. Customer: We can implement the middleware fix today. But what about the 847 invoices that already failed? Can we replay them so they appear in the CRM with the correct currency? Support: Yes, I can replay the failed Stripe events from our side. The replay window is seventy-two hours, which comfortably covers everything since the issue started at 06:14 UTC yesterday. I count 847 failed invoice.finalized events in that window. Do you want me to replay all of them, or only the ones tied to active subscriptions? Customer: Please replay all 847. Our finance team needs the complete picture for reconciliation, and we would rather clean up everything now than discover missing records later. Can you also give us a CSV of affected invoice IDs with Stripe event IDs, timestamps, failure reasons, and the currency that was sent? Support: Absolutely. I will generate a CSV with invoice_id, stripe_event_id, attempted_at_utc, failure_reason, and currency. I will attach it to this ticket. I will also mark the ticket as high priority because of your close deadline. The CSV should be ready in a couple of minutes and will include all 847 rows. Customer: One thing I still do not understand: why did only 30 percent of invoices fail if we changed the default currency for all new customers? Support: Good question. The 30 percent represents invoices that were created after 06:14 UTC and did not have a subscription-level currency override. Customers with fixed overrides stayed on their original currency, and any invoice finalized before the deployment still used EUR. So it is a clean time-based cohort split, not a random failure pattern. That also makes the replay safe, because the affected set is well-defined and we can target exactly those events. Customer: That makes sense. So going forward, every new invoice without an override will fail until we deploy the normalization or your validator fix lands. Is there any risk that the replay will create duplicates if some of those invoices were later retried manually? Support: Minimal risk. The replay will use the same Stripe event IDs, so Stripe-side deduplication and our CRM idempotency key will prevent duplicates. If any invoice was already manually created in the CRM, the replay for that event will be skipped because the idempotency key exists. I will include the skip count in the status report. Customer: Agreed. I will open a pull request for the middleware change now. Can you confirm the exact field path in the Stripe payload that needs to be normalized? Support: The field is invoice.currency. It should be uppercased before the object is forwarded to the CRM endpoint. If you are using our Node SDK, the mapping happens in mapStripeInvoiceToCrm. A one-line .toUpperCase() on that field will do it. Make sure you do not touch currency codes elsewhere in the payload unless your own downstream systems expect lowercase. If you use a custom integration, normalize right after you receive the webhook from Stripe. Customer: Perfect. What about the replay — do you need us to do anything on our end, or can you trigger it from the gateway? Support: I can trigger it from our gateway. The replay will re-send each event to your CRM endpoint with the same event IDs, so Stripe-side deduplication will not interfere and you will not be double-billed. I will start it now and send you a status link. It usually completes within ninety minutes for this volume, often faster if your endpoint has decent throughput. Customer: Great. And the validator fix — what's the realistic ETA? Support: I am escalating to L2 now. Schema relaxations like this typically ship within two business days. I will add you to the internal ticket so you can track it. Given that the case sensitivity is stricter than necessary and affects multiple customers, I expect it will be prioritized. I will also make sure the change is backwards compatible so EUR and GBP invoices are unaffected. Customer: Thanks. One more thing — can we set up an alert so we catch this kind of integration failure faster next time? Support: Yes. I recommend adding a webhook failure alert in your Stripe dashboard for any event type returning non-2xx responses for more than fifteen minutes. You can also use our integration health dashboard, which surfaces 4xx and 5xx rates by connector in near real time. I can send you the link and a suggested alert threshold once we are done here. Customer: Please do. And can you confirm our monthly close will not be affected once the replay completes? Support: Once the replay completes, all 847 invoices should be present in the CRM. The CSV will let your finance team reconcile any discrepancies. If any individual invoice still fails during replay, I will open a separate follow-up ticket and notify you immediately. Based on the pattern, I do not expect any further failures once the middleware normalization is in place. Customer: Understood. Please proceed with the replay and send me the CSV and the status link. Support: Done. I have initiated the replay, attached the CSV to this ticket, and marked it high priority. You will receive an email update every thirty minutes until completion, and I will personally follow up in two hours. Is there anything else I can help with? Customer: No, that is comprehensive. Thank you for the quick diagnosis and action. Support: You are welcome, Alex. Good luck with the close tomorrow.
−58%
pairl output · 980 tokens
@v 1 @id m1 @ts 2026-07-11T09:00:00Z #a1 #rpt content="Hi Alex [...] How can I help today?" @rid=q1 #u2 #req content="our Atlas CRM integration with Stripe has been dropping invoice records. About 30 percent of new invoices never make it into the CRM. [...] blocking our monthly close tomorrow" @rid=q2 #a3 #rpt content="confirm the workspace ID and the Stripe account [...] when did you first notice the discrepancy?" @rid=q3 #u4 #req content="Workspace ID is wsp_acme_prod_8841. [...] Stripe account is acct_1HjKLmn, connected via OAuth about eight months ago. [...] failures started yesterday" @rid=q4 #a5 #rpt content="Starting at 06:14 UTC yesterday, Stripe events of type invoice.finalized began returning HTTP 422 from your CRM endpoint. [...] Did anything change [...] around 06:10 to 06:15 UTC yesterday?" @rid=q5 #u6 #req content="we changed the default currency for new customers from EUR to USD. The deployment went out at 06:10 UTC." @rid=q6 #a7 #rpt content="It expects uppercase ISO 4217 codes such as USD, EUR, or GBP. [...] the validator rejects the payload with a 422" @rid=q7 #u8 #req content=""currency": "usd", "amount_due": 14900 [...] definitely a case issue" @rid=q8 #a9 #rpt content="case mismatch between Stripe's lowercase currency code and the CRM's uppercase validator [...] add a normalization step in your middleware, or we can relax the validator on our end" @rid=q9 #u10 #req content="What's the fastest path? [...] before our monthly close tomorrow afternoon" @rid=q10 #a11 #rpt content="add a one-line normalization in your middleware that uppercases the currency code [...] deployed today [...] escalate to our engineering team" @rid=q11 #u12 #req content="what about the 847 invoices that already failed? Can we replay them" @rid=q12 #a13 #rpt content="replay window is seventy-two hours [...] 847 failed invoice.finalized events in that window" @rid=q13 #u14 #req content="replay all 847 [...] CSV of affected invoice IDs with Stripe event IDs, timestamps, failure reasons, and the currency" @rid=q14 #a15 #rpt content="CSV with invoice_id, stripe_event_id, attempted_at_utc, failure_reason, and currency [...] high priority" @rid=q15 #u16 #req content="why did only 30 percent of invoices fail" @rid=q16 #a17 #rpt content="created after 06:14 UTC and did not have a subscription-level currency override [...] clean time-based cohort split" @rid=q17 #u18 #req content="risk that the replay will create duplicates [...] retried manually?" @rid=q18 #a19 #rpt content="same Stripe event IDs [...] CRM idempotency key will prevent duplicates" @rid=q19 #u20 #req content="exact field path in the Stripe payload" @rid=q20 #a21 #rpt content="The field is invoice.currency. [...] mapStripeInvoiceToCrm. A one-line .toUpperCase() on that field will do it." @rid=q21 #u22 #req content="can you trigger it from the gateway?" @rid=q22 #a23 #rpt content="I can trigger it from our gateway. [...] completes within ninety minutes" @rid=q23 #u24 #req content="the validator fix — what's the realistic ETA?" @rid=q24 #a25 #rpt content="ship within two business days [...] EUR and GBP invoices are unaffected" @rid=q25 #u26 #req content="set up an alert [...] catch this kind of integration failure faster" @rid=q26 #a27 #rpt content="webhook failure alert in your Stripe dashboard for any event type returning non-2xx responses for more than fifteen minutes" @rid=q27 #u28 #req content="confirm our monthly close will not be affected" @rid=q28 #a29 #rpt content="Once the replay completes, all 847 invoices should be present in the CRM." @rid=q29 #u30 #req content="proceed with the replay [...] send me the CSV and the status link" @rid=q30 #a31 #rpt content="initiated the replay, attached the CSV [...] marked it high priority [...] email update every thirty minutes" @rid=q31 #u32 #req content="Thank you for the quick diagnosis" @rid=q32 #a33 #rpt content="You are welcome, Alex." @rid=q33
x-pairl-context: true202 tokens saved in this conversation
BSFZ — officially recognized German research project

Officially recognized research project in Germany — certified and publicly funded under the German Research Allowance (Forschungszulage), assessed by the BSFZ federal certification body.

The invisible layer

An edge that cuts your AI bill — and never touches your code

PAIRL sits between your application and your provider. It compresses redundant context before each request — your code stays the same, your costs don’t.

Zero migration risk

Change one line: your API base URL. Your models, provider, and keys stay exactly as they are. Integration takes minutes, not sprints.

50–90% fewer tokens

Agent chains and long conversations accumulate context fast. PAIRL compresses it before it hits your provider — one live session compressed over 749,000 tokens.

Transparency by design

Every response carries your exact savings, the PAIRL fee, and encoding cost. No black boxes — you know what you saved and what you paid on every call.

50–90%
typical token reduction
99.9%
peak compression, live test
3 modes
compression control
€0
fee when no savings occur
Open protocol · managed edge

A new protocol for agent communication

Your existing OpenAI and Anthropic workflows keep running. PAIRL standardizes how agent fleets talk — keeping load-bearing facts lossless while the rest is carried as verbatim quotes of the original conversation — trimmed, never rewritten.

90%
max savings
2.4×
faster inference
Open the specification

Your keys. Your models. Your provider.

The protocol is open and published. We bill only a fraction of your documented, measured savings — and nothing at all when a request doesn’t compress profitably.

response headers
x-pairl-savings: 0.901
x-pairl-context: true
x-pairl-fee: €0.0004
x-pairl-encode: 12ms
Live in minutes, not months

Three steps from sign-up to measurable savings

01

Connect PAIRL

Point your application at the gateway with a single URL change. Run with compression off to capture your baseline. No risk, no surprises.

02

Compression runs automatically

No configuration. PAIRL compresses where it’s profitable and passes requests through unchanged when it isn’t. Always fail-safe — your calls never break.

03

Track your savings

Every response carries savings data. Your dashboard shows token reduction, cost saved, and the PAIRL fee — per request, per day, per month. Export anytime.

Pricing

You only pay when we save you money

Keep your provider keys and models. PAIRL charges only a fraction of your verified savings — zero fee when a request doesn’t compress. No platform tax, no seat fees, no setup costs.

Basic
For trying PAIRL and side projects
70%you keep
no monthly fee
  • Start immediately, no commitment
  • Fair-use guardrails included
  • Zero fee when no savings occur
Start for free
Pro
For individual developers and small teams
75%you keep
+ €49/month
  • Everything in Basic
  • A larger share of your savings stays with you
Get started
Enterprise
For high-volume and regulated workloads
85%you keep
+ €1,599/month
  • Everything in Scale
  • Optional self-hosted deployment
  • Custom onboarding and SLA
Talk to us

Credits are pre-purchased and consumed only on verified savings. No surprises on your bill.

Sovereign EU hosting

In a regulated industry? Keep your AI traffic on EU soil.

For finance, healthcare, the public sector and other compliance-bound teams, we deploy a dedicated PAIRL gateway in sovereign EU infrastructure — full data residency, your own isolated environment, and the same one-line setup. Your data stays in your jurisdiction.

Playground

See what happens to your context

Paste any agent message and watch PAIRL compress it before it reaches the model. Real engine, running live.

Source text
Compiled PAIRL

Awaiting command

Playground

This playground offers 3 free requests per day for demonstration purposes. Inputs are forwarded to Google Gemini — do not enter personal or sensitive data. For production use, sign up at console.pairl.dev.

Open source

Open protocol. Drop-in libraries.

PAIRL is an open specification. Encode, validate, and decode messages natively in your own stack with the reference libraries — same format the gateway speaks, no lock-in.

TypeScriptnpm
PythonPyPI
Rustcrates.io
The gateway compresses deeper

The open libraries handle the PAIRL format itself. The hosted gateway adds advanced compression techniques of our own that go well beyond what a self-hosted implementation can reach — substantially more token savings, with the same one-line setup. See how it works.

FAQ

Everything you need to evaluate PAIRL

Is PAIRL production-ready?+
PAIRL is in early Beta. The core protocol (v1.6) and the Gateway proxy are functional and in active use, but we’re still refining encoding quality across domains, improving latency, and expanding provider support. Expect rough edges — and honest changelogs.
How long does integration actually take?+
Most teams are live in under 10 minutes. Change your API base URL to PAIRL, add your key, and compression starts on your next request. No SDK, no refactoring, no model migration.
How much can I realistically save?+
Agent workloads with growing context histories — copilots, multi-step chains, long conversations — typically see 50–90% token reduction. One live test saved 749,964 tokens in a single session.
How is PAIRL different from TOON or Headroom?+
They solve different problems and compose rather than compete. The clearest way to see it is by layer:
  • TOON works at the syntax layer — a leaner, lossless way to spell JSON, best for uniform tables (~30–60% vs JSON). A data format you reach for in your own payloads.
  • Headroom works at the runtime layer — a proxy/middleware that compresses whatever bytes flow to the model (tool outputs, logs, RAG chunks) and can fetch elided detail back on demand.
  • PAIRL works at the semantic layer — it defines what’s actually being communicated. Facts that must stay correct (names, numbers, dates, sources) are kept losslessly, and conversation history is carried as verbatim quotes with marked omissions — compressed by cutting, not by rewriting. It also carries conversation threading, provenance, and cost as part of the message.
So PAIRL doesn’t replace them — it sits a layer above, and you can even stack all three. What’s unique to PAIRL is the guarantee: it’s the only one that can intentionally drop tokens while keeping your load-bearing facts intact. The Gateway applies that protocol automatically in front of your existing stack.
What if PAIRL can’t compress a request?+
It passes the request through unchanged — your call succeeds as normal, and PAIRL charges nothing. You’re never billed for requests where we don’t deliver savings. Fail-open is the default.
Do you train on our data?+
No. The gateway is transparent — your requests pass through to your provider and we don’t train any models on them. The only exception is opt-in: if you enable telemetry in your user settings, we collect aggregate usage statistics (token counts, savings, latency) to help you track performance. That’s statistics only — never model training, and it stays off unless you turn it on.
Do I have to change my provider or models?+
No. PAIRL works in front of your existing OpenAI or Anthropic setup. Your provider contract, model choices, and API keys stay exactly as they are. PAIRL is transparent to your application.
The protocol is open — what does PAIRL add?+
The spec is intentionally public. PAIRL provides the managed implementation: production-grade reliability, request-level cost analytics, security and compliance controls, and the enterprise rollout experience. That’s months of engineering, ready today.
PAIRL

Start cutting your token bill today

One URL change. Measurable savings on every request. Nothing to pay until PAIRL saves you money.