What Data Does OmniRoute Process? A Complete Guide to AI Proxy Data Types

OmniRoute processes 15+ categories of AI request data including chat completions, embeddings, image/video/audio/music generation, reranking, search, file uploads, batch operations, and agent protocol payloads.

OmniRoute is a universal AI proxy built on Next.js that normalizes diverse request formats into a unified OpenAI-compatible API. Understanding what data OmniRoute processes helps developers integrate multiple AI providers through a single endpoint. This article examines each data category, its payload structure, and the specific source files handling transformation and routing.

Chat Completions: The Core Data Type

Chat completions represent the most commonly processed data in OmniRoute. The system accepts standard OpenAI-style payloads containing model, messages[] with role-based content, and optional parameters like stream, temperature, and max_tokens.

In src/app/api/v1/chat/completions/route.ts, requests are validated against Zod schemas before translation. The translator module at open-sse/translator/index.ts converts incoming payloads to provider-specific formats for services like Anthropic Claude, Google Gemini, or OpenAI GPT.

POST https://omniroute.example.com/v1/chat/completions
Authorization: Bearer sk-********
Content-Type: application/json
X-OmniRoute-Compression: default

{
  "model": "cc/claude-opus-4-6",
  "messages": [{ "role": "user", "content": "Explain quantum tunneling." }],
  "stream": true
}

Custom headers like X-OmniRoute-No-Cache, X-Session-Id, and X-OmniRoute-Cost-Saved control caching, affinity, and telemetry as documented in the API reference at lines 64-80.

Embedding and Vector Data

Embeddings require simpler payloads consisting of model and input fields. OmniRoute processes text inputs and routes them to providers like Nebius, OpenAI, or specialized embedding services.

The embeddings route at src/app/api/v1/embeddings/route.ts handles payload validation and response normalization. The open-sse/executors/ directory contains provider-specific implementations that construct upstream URLs and headers.

POST https://omniroute.example.com/v1/embeddings
Authorization: Bearer sk-********
Content-Type: application/json

{
  "model": "nebius/Qwen/Qwen3-Embedding-8B",
  "input": "The food was delicious"
}

Multimedia Generation Data

OmniRoute processes four distinct media generation data types:

Image Generation

Image generation payloads include model, prompt, and optional parameters size, quality, and style. The route at src/app/api/v1/images/generations/route.ts handles providers like DALL-E, Midjourney, and Stable Diffusion.

POST https://omniroute.example.com/v1/images/generations
Authorization: Bearer sk-********
Content-Type: application/json

{
  "model": "openai/gpt-image-2",
  "prompt": "A beautiful sunset over mountains",
  "size": "1024x1024"
}

Video Generation

Video generation accepts model, prompt, and optional resolution and duration parameters. Source: src/app/api/v1/videos/generations/route.ts.

Music Generation

Music generation processes model, prompt, and optional style and length fields. Source: src/app/api/v1/music/generations/route.ts.

Audio Data Types

OmniRoute handles bidirectional audio processing:

Search and Reranking Data

Search queries combine model, query, and optional filters to leverage built-in web-search providers. The route at src/app/api/v1/search/route.ts enables semantic and keyword search without external integration.

POST https://omniroute.example.com/v1/search
Authorization: Bearer sk-********
Content-Type: application/json

{
  "model": "search/google",
  "query": "latest TypeScript 6 features"
}

Rerank data structures include model, query, and documents[] arrays for relevance scoring, processed by src/app/api/v1/rerank/route.ts.

Batch and File Operations

Batch Processing

Batch data aggregates multiple independent requests into a single payload. The requests array contains objects with method, path, and body properties, enabling efficient bulk operations through src/app/api/v1/batches/route.ts.

POST https://omniroute.example.com/v1/batches
Authorization: Bearer sk-********
Content-Type: application/json

{
  "requests": [
    { "method": "POST", "path": "/v1/chat/completions", "body": { "model": "openai/gpt-4o", "messages": [{ "role": "user", "content": "Who won the 2024 Olympics?" }] } },
    { "method": "POST", "path": "/v1/embeddings", "body": { "model": "openai/text-embedding-3-large", "input": "Machine learning is evolving." } }
  ]
}

File Uploads and Downloads

Binary file data flows through src/app/api/v1/files/route.ts with metadata attachments. Endpoints support POST /v1/files for uploads and GET /v1/files/{id} for retrieval.

Agent Protocol and Infrastructure Data

OmniRoute processes specialized data formats for modern AI agent ecosystems:

A2A Protocol Data

JSON-RPC 2.0 request/response objects enable agent-to-agent communication through endpoints under /a2a/*. Implementation resides in src/lib/a2a/.

MCP Tools and Webhooks

Event payloads and tool-specific JSON schemas support Model Context Protocol integration. The open-sse/mcp-server/ directory contains server definitions and tool handlers.

Combo Management Data

Combo definitions encode routing strategies, provider overrides, and failover sequences. These configurations determine how requests dispatch to multiple providers sequentially or in parallel via open-sse/services/combo.ts.

Internal Processing Data Types

OmniRoute transforms raw inputs through several internal data pipelines:

Memory and Skills Injection

Structured context snippets from src/lib/memory/ and skill-specific inputs from src/lib/skills/ are injected into requests before upstream transmission. This data enhances context awareness without client-side complexity.

Guardrails and PII Processing

Raw request/response bodies undergo examination in src/lib/guardrails/pii-masker.ts for sensitive data detection and redaction. This processing layer operates on the full payload stream without altering the external API contract.

Compression Plans

Header-driven compression directives via X-OmniRoute-Compression override default engine selection. The pipeline in open-sse/compression/lite.ts condenses prompts before upstream calls, with configuration documented in API reference lines 87-108.

Model Discovery Data

Model catalog data returns from GET /v1/models without request bodies, listing all supported chat, embedding, and image models plus available combos. This enables dynamic client-side model selection.

Data Flow Architecture

OmniRoute processes all data types through a consistent six-stage pipeline:

  1. API Route validation — Zod schema enforcement in Next.js routes
  2. Translationopen-sse/translator/ converts OpenAI formats to provider-native structures
  3. Executionopen-sse/executors/ builds upstream requests
  4. Combo routingopen-sse/services/combo.ts handles multi-provider dispatch
  5. Response transformation — upstream formats normalized to OpenAI-compatible output
  6. Enhancement — guardrails, memory injection, and compression applied

Summary

  • OmniRoute processes 15+ distinct data categories spanning text, embeddings, images, video, audio, music, search, reranking, files, and batches
  • Agent protocols (A2A, MCP) enable modern multi-agent system integration
  • Internal data pipelines handle compression, PII masking, memory injection, and skill execution transparently
  • Custom HTTP headers control caching, sessions, idempotency, and cost telemetry per request
  • All data flows through unified OpenAI-compatible endpoints regardless of upstream provider format

Frequently Asked Questions

What format does OmniRoute expect for chat completion requests?

OmniRoute accepts standard OpenAI-style JSON payloads with model, messages[] containing role-based content, and optional parameters like stream, temperature, and max_tokens. The route at src/app/api/v1/chat/completions/route.ts validates these with Zod schemas before translation to provider-specific formats.

Can OmniRoute process multiple AI requests in a single API call?

Yes. The batch API at POST /v1/batches accepts an array of request objects, each specifying method, path, and body. This enables efficient bulk processing of mixed operation types—combining chat completions, embeddings, and other endpoints in one payload.

How does OmniRoute handle binary data like audio files and images?

Binary uploads flow through dedicated endpoints: audio to src/app/api/v1/audio/transcriptions/route.ts, general files to src/app/api/v1/files/route.ts. These routes handle multipart form data, extract metadata, and route binaries to appropriate providers while returning standardized JSON responses.

What controls whether my data gets compressed or cached?

The X-OmniRoute-Compression header overrides compression engine selection, processed by open-sse/compression/lite.ts. For caching, X-OmniRoute-No-Cache disables response caching, while X-Session-Id enables session affinity. These headers are documented in the API reference alongside standard chat completion parameters.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →