Skip to content
PALM SOUQ
Claude Sonnet 4.5 and DeepSeek V3.2 cache metering is live

Your AI agent shouldn't bankrupt your SaaS on a $49 plan.

PALM SOUQ attributes LLM spend to every customer, kills runaway agent loops in the request path, and protects gross margin before the invoice lands.

  • 1-line SDK change
  • <5 ms latency
  • Zero payload logging
  • Stripe & Metronome ready
gateway.palmsouqltd.com
Spend today
$547.90
Loop calls
0 / 15
Requests blocked
0
TenantTierCOGS todayPlanStatus
acme-legalPro$18.40$99/mohealthy
northwind-opsTeam$212.60$299/mo80% soft cap
globex-aiEnterprise$304.10$1500/mohealthy
initechPro$11.90$99/mohealthy
umbrella-hrFree$0.90freefallback: haiku
  1. 14:02:07umbrella-hr Free quota 100%: routed claude-sonnet-4.5 to claude-haiku-4.5
  2. 14:01:52northwind-ops Soft cap 80% reached: webhook quota.warning sent

Governs traffic to every major provider, framework and billing system

  • OpenAI logoOpenAI
  • Anthropic logoAnthropic
  • Google Gemini logoGoogle Gemini
  • AWS Bedrock logoAWS Bedrock
  • DeepSeek logoDeepSeek
  • Mistral logoMistral
  • Groq logoGroq
  • LangChain logoLangChain
  • CrewAI logoCrewAI
  • Stripe logoStripe
  • Metronome logoMetronome
  • Orb logoOrb

The SaaS gross margin trap

Generative AI broke traditional SaaS unit economics.

In classic SaaS one more active user costs fractions of a cent. In GenAI a power user or a misconfigured agent can burn a month of subscription revenue in an afternoon, and flat-rate pricing hides it until the provider invoice arrives.

One power user on a $99 plan
-$301 /mo

$99 of revenue minus $400 of raw model tokens. Multiply by the 25 heaviest accounts out of 500 and the whole plan is underwater.

One stuck coding agent, 45 minutes
$1,200

2,500 Claude Sonnet calls at 150k input and 2k output tokens each: $0.48 per call, about $27 every minute nobody is watching.

Cache reads vs uncached input, Sonnet 4.5
10x

$0.30 vs $3.00 per million tokens. Meter them as one number and you misprice every tenant with a long system prompt.

How it works

Four steps from first request to protected margin.

No sidecars, no agents to install, no prompt data leaving the request path.

request.httpStep 01 of 04
POST https://gateway.palmsouqltd.com/v1/chat/completions
Authorization: Bearer $OPENAI_API_KEY
X-PalmSouq-Tenant: acme-legal
X-PalmSouq-Tier: pro
X-PalmSouq-Feature: contract-review

# body streams straight through, never written to disk

Active circuit breaking vs passive alerting

Passive alerts tell you that you lost money. PALM SOUQ prevents the loss.

Most observability tools post a Slack alert 30 minutes after spend spikes. By then an agent trapped in a tool-calling recursion has made hundreds of requests. PALM SOUQ sits in the request path, scores token velocity and repetition on every call, and stops the run immediately.

See circuit breaker mechanics
loop_cost.svgSame incident, two outcomes
$0$300$600$900$12000 min15 min30 min45 minSlack alert, $800 gonePALM SOUQ breaker, call 15: $7.20
Passive: alert fires, a human investigates In path: 429 returned on call 15

# before

client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])

# with PALM SOUQ: per-tenant governance and circuit breaking

client = OpenAI(
    base_url="https://gateway.palmsouqltd.com/v1",
    api_key=os.environ["OPENAI_API_KEY"],
    default_headers={
        "X-PalmSouq-Tenant": user.tenant_id,
        "X-PalmSouq-Tier": user.plan_tier,
    },
)

Drop-in, zero latency tax

Swap a base URL. Keep your SDK, your keys and your code.

PALM SOUQ speaks the OpenAI and Anthropic wire formats natively and proxies Gemini, Bedrock, Azure OpenAI, Mistral, Groq and DeepSeek through the same edge.

added p50 latency
<5 ms
added p50 latency
gateway SLA
99.999%
gateway SLA
edge locations
280+
edge locations
SDK default
Fail-open
SDK default

Worked example · B2B support agent SaaS

500 customers at $99/mo is $49,500 MRR. 25 of them were costing you money.

Power users25
Raw model spend each, before$400/mo
Margin each, before-$301/mo
PALM SOUQ per-tenant cap$35/mo
Recovered: 25 x ($400 - $35)+$9,125/mo
Run it with your numbers
“PALM SOUQ caught an infinite tool loop in our agent during our second week. It saved us roughly $6,000 on a single Saturday.”
VP of Engineering · Series A legal AI assistant
“We finally know our exact gross margin per customer. We moved 12 power users to usage overages and took SaaS gross margin from 48% to 76%.”
Head of FinOps · Enterprise customer support platform

Zero Payload Retention

We meter the envelope, never the letter.

Prompts and completions stream through gateway memory and are never written to disk, logged or used for training. PALM SOUQ keeps headers, token counts, hashes and timings. SOC 2 Type II certified, GDPR aligned, HIPAA BAA available.

What PALM SOUQ stores

  • tenant, tier, feature headers
  • model and provider
  • input / cached / output tokens
  • cost in USD and latency
  • tool name + salted args hash
  • breaker and quota decisions

What never touches disk

  • system and user prompts
  • completions and reasoning
  • tool call arguments (raw)
  • retrieved documents
  • end-user PII in payloads
  • your provider API keys in plaintext

Questions, answered

How much latency does PALM SOUQ add?

Under 5 ms at p50 on the edge path. The gateway runs on 280+ Anycast points of presence, terminates TLS near your servers, and evaluates policies in memory. Token accounting happens on the streamed response, so it never holds a chunk back from your user.

What happens if PALM SOUQ goes down?

Our SDKs fail open by default: if the gateway does not answer within the configured budget, the request goes directly to the upstream provider with your own key and is reconciled later. You can switch a tenant or tier to fail-closed when budget containment matters more than uptime.

How does PALM SOUQ detect infinite loops without seeing prompt text?

The breaker works on metadata: tool names, a salted hash of tool arguments, token velocity per tenant, step counts per session and a locality-sensitive fingerprint of the completion computed in memory. Repetition is visible from hashes and counts alone, so raw prompts and completions never need to be stored.

Does PALM SOUQ support custom fine-tuned models?

Yes. Fine-tuned OpenAI models, Bedrock custom models and any OpenAI-compatible endpoint you host can be registered with your own per-token rates, so attribution and quotas work the same way as for list-price models.

How does prompt caching get billed?

PALM SOUQ meters cache writes, cache reads and uncached input separately for every tenant and prices each at the provider's rate. On Claude Sonnet 4.5 a cache read costs $0.30 per million tokens against $3.00 uncached, so lumping them together would overstate that tenant's COGS by up to ten times.

How does Stripe usage syncing work?

Each metered request becomes a usage event on the Stripe meter you choose, keyed by your customer ID. You decide whether to send raw tokens, dollars of COGS or a marked-up credit unit, and Stripe turns overages into invoice line items at the end of the period.

Don't wait for a surprise $10,000 OpenAI invoice.

Route your agent traffic through PALM SOUQ in 2 minutes. Change one base URL, pass a tenant header, and every token is attributed and governed.

14-day free production trial · 100k requests included · no card required