OpenRouter Ultra โ Fix Broken JSON & Structured Output
Pricing
from $3.00 / 1,000 ultra api call (validated + fallback protected)s
OpenRouter Ultra โ Fix Broken JSON & Structured Output
Stop dealing with broken JSON from LLMs. OpenRouter Ultra delivers reliable structured outputs from text or datasets using automatic retries, fallback models, and built-in repair. Get predictable costs and production-ready results for batch processing at scale.
Pricing
from $3.00 / 1,000 ultra api call (validated + fallback protected)s
Rating
0.0
(0)
Developer
Actor stats
1
Bookmarked
4
Total users
3
Monthly active users
2 months ago
Last modified
Categories
Share
๐ OpenRouter Ultra V1.1
A production-ready AI gateway built for reliability, structured outputs, and cost-efficient LLM workflows.
OpenRouter Ultra is not just another proxy. It is an intelligent execution layer on top of OpenRouter that makes AI responses usable in real-world systems.
โก Why OpenRouter Ultra?
Most LLM APIs break in production because of:
- โ invalid JSON
- โ inconsistent outputs
- โ high token costs
- โ unpredictable latency
- โ no observability
Ultra solves this.
๐ง What makes Ultra different
โ Reliable Structured Outputs
Ultra includes a multi-stage repair + validation pipeline:
- removes prose and markdown wrappers
- fixes quotes and trailing commas
- balances brackets
- enforces JSON schema
โ You get usable data instead of broken responses
โก Smart Routing (Speed, Cost, Quality)
Ultra automatically selects the best model based on:
- task type (chat, extraction, coding, etc.)
- latency targets
- cost constraints
Available presets:
ultra-fastโ lowest latencyultra-smartโ best qualityultra-privateโ privacy-focusedultra-jsonโ structured output optimizedultra-batchโ high-throughput processing
๐ธ Cost & Budget Control
Set limits directly in your request:
- max cost per request
- max tokens
- model fallback strategies
โ prevents runaway LLM costs in production
๐ Full Observability
Every request returns:
- latency
- selected model
- routing decisions
- repair status
- estimated cost
Plus debug endpoints:
/v1/request/:id/v1/debug/:id
๐งช Built-in Repair Engine
Ultra automatically fixes common LLM issues:
- missing quotes in JSON
- invalid syntax
- trailing commas
- broken structures
โ dramatically reduces parsing failures
๐ Optional TOON Format (Token Optimized)
Ultra supports an alternative format for structured data:
- less verbose than JSON
- fewer tokens for tabular data
- easier for LLMs to generate correctly
Content-Type: text/plaininputFormat: "toon"outputFormat: "toon"
Use when working with large structured payloads or batch jobs.
๐งฉ API Overview
Base Endpoint
POST /v1/ultra
Example Request
{"input":"Extract name and age from: John is 32 years old","mode":"ultra-extract","jsonSchema":{"type":"object","properties":{"name":{"type":"string"},"age":{"type":"number"}}}}
Example Response
{"success":true,"data":{"name":"John","age":32},"meta":{"latencyMs":842,"model":"anthropic/claude-3-haiku","costUsd":0.0021,"repairApplied":true}}
๐ง Specialized Endpoints
| Endpoint | Description |
|---|---|
/v1/ultra | Main intelligent routing endpoint |
/v1/extract | Structured data extraction |
/v1/convert | Format conversion (JSON โ TOON) |
/v1/repair | Fix broken LLM outputs |
/v1/request/:id | Retrieve past request |
/v1/debug/:id | Debug full pipeline |
๐ง Core Concepts
1. Ultra Modes
Define how the system behaves:
- speed vs quality vs cost
- structured vs freeform
- batch vs realtime
2. Repair Pipeline
Every response passes through:
- cleanup
- syntax fixing
- structure repair
- schema validation
3. Task Awareness
Ultra detects intent:
- extraction
- summarization
- chat
- coding
โ routes to optimal model chain
๐ฆ Use Cases
- AI-powered SaaS backends
- data extraction pipelines
- automation workflows
- marketplaces & platforms
- batch processing jobs
- agent systems
๐ Why this matters
Most developers spend hours fixing:
- broken JSON
- inconsistent outputs
- model switching logic
Ultra handles this automatically.
โ You focus on your product โ Ultra handles the AI complexity
๐ Authentication
Use your OpenRouter API key:
$Authorization: Bearer YOUR_OPENROUTER_KEY
โ๏ธ Running on Apify
This actor runs as a serverless AI gateway:
- scalable
- production-ready
- easy to integrate
- supports batch + realtime
๐ค Contributing / Feedback
If you're building serious AI systems, feedback is welcome.
โก TL;DR
OpenRouter Ultra turns:
LLM output โ broken JSON โ debugging hell
into:
LLM output โ validated structured data โ production-ready
