Chat & Deep Reasoning

Stream responses from Groq, Mistral, NVIDIA, Gemini, Cohere, or Edge GPUs.

Ready
Auto-Failover Active
OmniAI Gateway Just now

Hello! I am your **Universal AI Assistant** connected to 46+ models across NVIDIA, Groq, Mistral, Cohere, Gemini, and Cloudflare Edge GPUs.

Select any model from the dropdown above and start typing!

Text-to-Image Studio

Generate photorealistic 8k artwork in ~2 seconds using Cloudflare Edge GPUs.

No Image Generated Yet

Type a prompt on the left and click Generate to see the magic happen!

OpenAI Whisper Large v3

Upload any audio file or record your voice to transcribe speech into text instantly.

Drag & Drop Audio File Here

Supports MP3, WAV, M4A, OGG, WEBM

Transcribed Output

Transcription results will appear here in real-time...

Translation will appear here instantly...

BGE Large Vector Embeddings

Generate 1024-dimensional semantic vectors for vector databases, RAG, and cosine similarity search.

Cosine Similarity Score

--%

Raw Vector Preview (First 20 Dimensions)

Click compute to view vector dimensions...

Content Safety & Sentiment Meter

Evaluate prompts against Llama-Guard 3 safety filters and DistilBERT emotion scoring.

Llama-Guard 3 Safety Awaiting input
DistilBERT Sentiment Awaiting input
OAS 3.1.0 Universal Multi-Modal Gateway v8.1 59 Models Active

Universal AI Gateway — Swagger API & Multi-Platform Hub

Explore OpenAPI-standard interactive documentation for all 59 models across 20 providers. Test endpoints live with auto-failover, or grab copy-paste production SDK code for Android APKs, Web Apps, Desktop Applications, and Chrome Extensions (Manifest V3).

Active Base URL: https://tiny-shape-e3d1.mukulgupta0014.workers.dev
Master Bearer Key: Authorized

System Discovery & Health

2 Endpoints
GET /health Check gateway operational status, failover pool, and active providers Public

Returns health metadata, currently active provider networks, total models loaded, and edge GPU availability.

Live request against active gateway
GET /v1/models OpenAI-compatible list of all 59 registered catalog models & aliases Public

Returns an OpenAI-compliant {"object":"list","data":[...]} collection containing all available models across NVIDIA, Groq, Mistral, Gemini, DeepSeek, Cerebras, SambaNova, and Cloudflare Edge GPUs.

Live request against active gateway

Chat Completions & Frontier Reasoning

1 Unified Endpoint (59 Models)
POST /v1/chat/completions Universal multi-model chat & reasoning with SSE streaming and 4-tier auto-failover Bearer Auth

OpenAI-compatible chat completion endpoint. Supports all 59 models. Automatically triggers instant zero-downtime failover across Groq, Cerebras, Mistral, GitHub Models, Gemini, NVIDIA NIM Pool, and Cloudflare Edge GPUs if any upstream provider encounters rate-limits.

Request Body (application/json) Schema: OpenAI ChatCompletionRequest
Master Bearer token will be sent in Authorization header

Multimodal Image & Speech Inference

2 Endpoints
POST /v1/images/generations FLUX.1 Schnell & SDXL photorealistic text-to-image generation (JPEG stream) Bearer Auth

Generates high-definition images using Cloudflare Edge GPUs (FLUX.1 Schnell & SDXL Lightning) with zero-cost Pollinations fallback. Returns raw binary image/jpeg.

Request Body (application/json)
Returns binary image stream rendered live in console
POST /v1/audio/transcriptions OpenAI Whisper Large v3 Turbo audio transcription (Raw Binary Audio) Bearer Auth

Transcribes voice or audio files using Whisper Large v3 Turbo on Cloudflare Edge GPUs. Send raw audio bytes (WAV, MP3, WebM, OGG) directly in the request body with Content-Type: application/octet-stream.

To test live audio transcription, use the dedicated Audio & Whisper Studio tab with your microphone or sample file.

Vector Embeddings, Rerank & Live Search

3 Endpoints
POST /v1/embeddings BGE Large 1024-dimensional semantic dense vector embeddings Bearer Auth

Computes 1024-dimensional semantic embeddings for strings or arrays of strings using BAAI BGE-Large on Edge GPUs.

Request Body (application/json)
POST /v1/rerank Cohere v3.5 semantic document reranker for high-precision RAG Bearer Auth

Reranks a list of candidate documents against a query string using Cohere Rerank v3.5, scoring relevance for RAG pipelines.

Request Body (application/json)
POST /v1/search Real-time live internet search via Tavily AI & DuckDuckGo Bearer Auth

Performs live internet search and extracts grounded web content snippets with automatic DuckDuckGo fallback.

Request Body (application/json)

Translation, Summarization & Moderation

4 Endpoints
POST /v1/translations Meta M2M-100 multilingual neural translation across 100+ languages Bearer Auth
POST /v1/summarizations Facebook BART Large CNN neural document summarization Bearer Auth
POST /v1/moderations Meta Llama-Guard 3 safety moderation & prompt injection filter Bearer Auth
POST /v1/sentiment DistilBERT SST-2 sentiment analyzer & emotion scoring Bearer Auth

Android APK Integration (Kotlin & OkHttp)

Native Android / APK

Connect any Android application (APK) directly to the OmniAI Gateway. Supports streaming Server-Sent Events (SSE) directly into Jetpack Compose or XML Views with automatic token reassembly and background Coroutine execution.

app/build.gradle.kts
dependencies {
    // OkHttp 4 for high-performance HTTP & SSE streaming
    implementation("com.squareup.okhttp3:okhttp:4.12.0")
    implementation("com.squareup.okhttp3:okhttp-sse:4.12.0")
    
    // Kotlin Coroutines for async execution
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0")
    
    // JSON Serialization
    implementation("com.google.code.gson:gson:2.10.1")
}
app/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- Required for OmniAI Gateway Network Access -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
OmniAIGatewayClient.kt
package com.example.omniai

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody.Companion.toRequestBody
import org.json.JSONArray
import org.json.JSONObject
import java.io.BufferedReader
import java.io.InputStreamReader

class OmniAIGatewayClient(
    private val baseUrl: String = "https://tiny-shape-e3d1.mukulgupta0014.workers.dev",
    private val masterKey: String = "sk_live_master_gateway_key_2026"
) {
    private val client = OkHttpClient.Builder().build()
    private val jsonMediaType = "application/json; charset=utf-8".toMediaType()

    /**
     * Streams chat responses token by token into a Kotlin lambda callback
     */
    suspend fun streamChat(
        model: String = "meta/llama-3.2-11b-vision-instruct",
        userPrompt: String,
        onTokenReceived: (String) -> Unit,
        onComplete: () -> Unit,
        onError: (Throwable) -> Unit
    ) = withContext(Dispatchers.IO) {
        val payload = JSONObject().apply {
            put("model", model)
            put("stream", true)
            put("messages", JSONArray().apply {
                put(JSONObject().put("role", "system").put("content", "You are an intelligent Android assistant."))
                put(JSONObject().put("role", "user").put("content", userPrompt))
            })
        }

        val request = Request.Builder()
            .url("$baseUrl/v1/chat/completions")
            .addHeader("Authorization", "Bearer $masterKey")
            .post(payload.toString().toRequestBody(jsonMediaType))
            .build()

        try {
            val response = client.newCall(request).execute()
            if (!response.isSuccessful) throw Exception("HTTP Error: ${response.code}")

            val reader = BufferedReader(InputStreamReader(response.body?.byteStream() ?: return@withContext))
            var line: String?
            while (reader.readLine().also { line = it } != null) {
                val currentLine = line?.trim() ?: continue
                if (currentLine.startsWith("data:")) {
                    val data = currentLine.removePrefix("data:").trim()
                    if (data == "[DONE]") break
                    try {
                        val json = JSONObject(data)
                        val content = json.getJSONArray("choices")
                            .getJSONObject(0)
                            .getJSONObject("delta")
                            .optString("content", "")
                        if (content.isNotEmpty()) {
                            withContext(Dispatchers.Main) { onTokenReceived(content) }
                        }
                    } catch (e: Exception) { /* skip partial malformed packets */ }
                }
            }
            withContext(Dispatchers.Main) { onComplete() }
        } catch (t: Throwable) {
            withContext(Dispatchers.Main) { onError(t) }
        }
    }
}

Web Integration (React, Next.js & Vanilla JS)

Web & Mobile Web

Easily integrate the OmniAI Gateway into React, Next.js, Vue, or Vanilla HTML/JavaScript using standard standard browser Fetch and the ReadableStream API.

useOmniAI.ts (Custom React Hook)
import { useState, useCallback } from 'react';

const GATEWAY_URL = "https://tiny-shape-e3d1.mukulgupta0014.workers.dev";
const MASTER_KEY = "sk_live_master_gateway_key_2026";

export function useOmniAI() {
  const [response, setResponse] = useState("");
  const [isGenerating, setIsGenerating] = useState(false);
  const [error, setError] = useState<string | null>(null);

  const askModel = useCallback(async (prompt: string, model = "meta/llama-3.2-11b-vision-instruct") => {
    setIsGenerating(true);
    setResponse("");
    setError(null);

    try {
      const res = await fetch(`${GATEWAY_URL}/v1/chat/completions`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "Authorization": `Bearer ${MASTER_KEY}`
        },
        body: JSON.stringify({
          model,
          messages: [{ role: "user", content: prompt }],
          stream: true
        })
      });

      if (!res.ok) throw new Error(`Gateway returned HTTP ${res.status}`);

      const reader = res.body?.getReader();
      if (!reader) throw new Error("No readable stream");

      const decoder = new TextDecoder();
      let accumulated = "";

      while (true) {
        const { done, value } = await reader.read();
        if (done) break;

        const chunk = decoder.decode(value, { stream: true });
        const lines = chunk.split("\n");

        for (const line of lines) {
          const trimmed = line.trim();
          if (trimmed.startsWith("data:") && !trimmed.includes("[DONE]")) {
            try {
              const data = JSON.parse(trimmed.replace(/^data:\s*/, ''));
              const delta = data.choices?.[0]?.delta?.content || "";
              accumulated += delta;
              setResponse(accumulated);
            } catch (e) {}
          }
        }
      }
    } catch (err: any) {
      setError(err.message);
    } finally {
      setIsGenerating(false);
    }
  }, []);

  return { askModel, response, isGenerating, error };
}
Vanilla JS (Drop-In Function)
async function generateAIResponse(prompt, onToken) {
  const res = await fetch("https://tiny-shape-e3d1.mukulgupta0014.workers.dev/v1/chat/completions", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "Authorization": "Bearer sk_live_master_gateway_key_2026"
    },
    body: JSON.stringify({
      model: "meta/llama-3.2-11b-vision-instruct",
      messages: [{ role: "user", content: prompt }],
      stream: true
    })
  });

  const reader = res.body.getReader();
  const decoder = new TextDecoder();
  while (true) {
    const { done, value } = await reader.read();
    if (done) break;
    const chunk = decoder.decode(value);
    for (const line of chunk.split("\n")) {
      if (line.startsWith("data:") && !line.includes("[DONE]")) {
        try {
          const content = JSON.parse(line.slice(5)).choices[0].delta.content;
          if (content) onToken(content);
        } catch (e) {}
      }
    }
  }
}

Desktop App Integration (Python, C# .NET, Electron)

Windows • macOS • Linux

Because the OmniAI Gateway implements standard OpenAI REST & SSE interfaces, you can drop it directly into official OpenAI Python SDKs, C# HttpClient, or Electron Desktop apps by merely pointing base_url to the gateway!

Python (Official OpenAI Library Drop-In)
import os
from openai import OpenAI

# 1. Initialize client pointing directly to your OmniAI Gateway
client = OpenAI(
    base_url="https://tiny-shape-e3d1.mukulgupta0014.workers.dev/v1",
    api_key="sk_live_master_gateway_key_2026"
)

# 2. Call any of the 59 models (e.g. DeepSeek R1, Groq, Codestral, Gemini 2.0 Flash)
response = client.chat.completions.create(
    model="deepseek-r1", # or "cerebras/llama-3.3-70b", "codestral", "gemini-2.0-flash"
    messages=[
        {"role": "system", "content": "You are a master desktop automation copilot."},
        {"role": "user", "content": "Generate a Python script to monitor clipboard history with timestamp."}
    ],
    stream=True
)

# 3. Stream output tokens to terminal or desktop UI
for chunk in response:
    content = chunk.choices[0].delta.content or ""
    print(content, end="", flush=True)
C# (.NET MAUI, WPF, WinUI)
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;

public class OmniAIDesktopClient
{
    private static readonly HttpClient client = new HttpClient();
    private const string GatewayUrl = "https://tiny-shape-e3d1.mukulgupta0014.workers.dev/v1/chat/completions";
    private const string MasterKey = "sk_live_master_gateway_key_2026";

    public static async Task<string> AskAIAsync(string prompt, string model = "meta/llama-3.2-11b-vision-instruct")
    {
        var requestBody = new
        {
            model = model,
            messages = new[] { new { role = "user", content = prompt } },
            stream = false
        };

        var request = new HttpRequestMessage(HttpMethod.Post, GatewayUrl);
        request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", MasterKey);
        request.Content = new StringContent(JsonSerializer.Serialize(requestBody), Encoding.UTF8, "application/json");

        var response = await client.SendAsync(request);
        response.EnsureSuccessStatusCode();

        var json = await response.Content.ReadAsStringAsync();
        using var doc = JsonDocument.Parse(json);
        return doc.RootElement.GetProperty("choices")[0].GetProperty("message").GetProperty("content").GetString();
    }
}

Chrome Extension Manifest V3 Integration

Manifest V3 Extension

In Manifest V3, background service workers are ephemeral and cannot use simple WebSockets or standard long-lived intervals without proper handling. This architecture uses chrome.runtime.connect long-lived ports to deliver low-latency token streaming to popup and sidepanel windows.

manifest.json
{
  "manifest_version": 3,
  "name": "ClipIQ AI Assistant",
  "version": "1.0.0",
  "permissions": [
    "storage",
    "clipboardRead"
  ],
  "host_permissions": [
    "https://*.workers.dev/*",
    "https://tiny-shape-e3d1.mukulgupta0014.workers.dev/*"
  ],
  "background": {
    "service_worker": "background.js",
    "type": "module"
  },
  "action": {
    "default_popup": "popup.html"
  }
}
background.js (MV3 Service Worker)
const GATEWAY_URL = "https://tiny-shape-e3d1.mukulgupta0014.workers.dev";
const MASTER_KEY = "sk_live_master_gateway_key_2026";

// Listen for connection from popup or sidebar
chrome.runtime.onConnect.addListener((port) => {
  if (port.name !== "omniai-stream") return;

  port.onMessage.addListener(async (msg) => {
    if (msg.type === "GENERATE_AI") {
      try {
        const res = await fetch(`${GATEWAY_URL}/v1/chat/completions`, {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
            "Authorization": `Bearer ${MASTER_KEY}`
          },
          body: JSON.stringify({
            model: msg.model || "meta/llama-3.2-11b-vision-instruct",
            messages: msg.messages,
            stream: true
          })
        });

        if (!res.ok) {
          port.postMessage({ type: "ERROR", error: `HTTP ${res.status}` });
          return;
        }

        const reader = res.body.getReader();
        const decoder = new TextDecoder();

        while (true) {
          const { done, value } = await reader.read();
          if (done) break;

          const chunk = decoder.decode(value);
          const lines = chunk.split("\n");

          for (const line of lines) {
            const trimmed = line.trim();
            if (trimmed.startsWith("data:") && !trimmed.includes("[DONE]")) {
              try {
                const data = JSON.parse(trimmed.replace("data:", "").trim());
                const token = data.choices?.[0]?.delta?.content || "";
                if (token) port.postMessage({ type: "TOKEN", token });
              } catch (e) {}
            }
          }
        }
        port.postMessage({ type: "DONE" });
      } catch (err) {
        port.postMessage({ type: "ERROR", error: err.message });
      }
    }
  });
});
popup.js (UI Consumer)
// Connect long-lived port to background service worker
const port = chrome.runtime.connect({ name: "omniai-stream" });

port.onMessage.addListener((msg) => {
  if (msg.type === "TOKEN") {
    document.getElementById("output").textContent += msg.token;
  } else if (msg.type === "DONE") {
    console.log("Streaming finished");
  } else if (msg.type === "ERROR") {
    alert("Error: " + msg.error);
  }
});

// Trigger generation
function sendPrompt(userText) {
  document.getElementById("output").textContent = "";
  port.postMessage({
    type: "GENERATE_AI",
    model: "meta/llama-3.2-11b-vision-instruct",
    messages: [{ role: "user", content: userText }]
  });
}

Gateway Authentication Architecture

All endpoints (except /health and /v1/models) are authenticated using Master Gateway Tokens. The gateway supports two interchangeable authorization schemes:

Authorization: Bearer <MASTER_TOKEN> Standard RFC 6750 bearer header. Compatible with official OpenAI, Anthropic, and LangChain client libraries.
X-API-Key: <MASTER_TOKEN> Custom API key header for environments where overriding Authorization headers is restricted.

Pre-configured Master Tokens in Active Gateway

Token Platform Audience Privilege Rate Limits
sk_live_master_gateway_key_2026 Studio Web Playground & Admin Master Admin Unlimited (Self-Failover)
sk_live_web_client_key_9a8b7c Production Web Integrations Web Client Unlimited (Auto-Tier)
sk_live_mobile_app_key_4d5e6f Android APK & Mobile Apps Mobile SDK Unlimited (Auto-Tier)

4-Tier Zero-Downtime Auto-Failover Flow

The gateway guarantees near 100% uptime through instant cascading failover across 20 global provider clusters:

Tier 1

Primary Requested Model

Direct low-latency route to Groq, Cerebras, Mistral, Cohere, Gemini, SambaNova, or Perplexity.

If HTTP 429 / 5xx / Rate Limit ↓
Tier 2

Cloudflare Native Edge GPUs

Immediate failover to Cloudflare Workers AI edge GPUs (Llama 3.1 8B, Qwen 2.5 7B, Mistral 7B) with zero rate limits.

If Edge Queue Saturated ↓
Tier 3

NVIDIA NIM 14-Key Pool

Rotates round-robin across 14 independent high-throughput NVIDIA NIM API keys (Llama 3.2 Vision, Gemma 4, Minimax).

If All Enterprise Pools Busy ↓
Tier 4

Pollinations Decentralized Cluster

Final zero-key decentralized AI cluster (OpenAI & Mistral instances) ensuring continuous unbroken output.

HTTP Status Code Matrix

Status Meaning Gateway Behavior
200 OK Success Inference returned or SSE stream opened successfully.
400 Bad Request Malformed JSON Invalid parameters or unsupported model specified.
401 Unauthorized Invalid Master Key Authorization header is missing or does not match master tokens.
503 Networks Busy All Tiers Exhausted Triggered only if all 4 cascading fallback tiers fail simultaneously.