OpenRouter Ultra – Fix Broken JSON & Structured Output
Pricing
from $6.00 / 1,000 successful api requests
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 $6.00 / 1,000 successful api requests
Rating
0.0
(0)
Developer
Chris
Actor stats
1
Bookmarked
2
Total users
1
Monthly active users
9 hours 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