Documentation

Build with Yomira.

Everything you need to know to ship: standard response shapes, authentication, rate limits, the engine fallback chain, and how the registry powers the UI.

Introduction

Yomira APIs is a multi-engine API hub. We expose a single, versioned gateway (/v1/<category>/<feature>) that handles authentication, rate limiting, quota, logging, validation, versioning, and routing for every API on the platform. Behind the gateway, each API is implemented as an independent service with one or more engines — if engine A fails, the gateway transparently tries engine B, then engine C, within a safe retry budget.

The catalog, documentation, and playground on this website are all generated from API manifests in a central registry. Adding a new API is just adding a manifest — no UI work required.

Standard Response

Every Yomira response — success or error — follows the same shape. The meta.requestId is always present and can be used to correlate a single request across logs, support tickets, and the dashboard.

Success:

{
  "success": true,
  "data": {
    // ... payload
  },
  "meta": {
    "requestId": "req_xxx",
    "serviceId": "downloader.tiktok",
    "engine": "engine-a",
    "attempts": [
      { "engineId": "engine-a", "error": "", "ms": 320 }
    ]
  }
}

Error:

{
  "success": false,
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Retry after 60s."
  },
  "meta": {
    "requestId": "req_xxx",
    "limit": 60,
    "remaining": 0,
    "resetAt": 1735000000000
  }
}

Common error codes: UNAUTHORIZED, FORBIDDEN, NOT_FOUND, VALIDATION_ERROR, RATE_LIMIT_EXCEEDED, QUOTA_EXCEEDED, SERVICE_UNAVAILABLE, INTERNAL_ERROR.

Authentication

All Yomira APIs require an API key. Pass it as a Bearer token or in the x-api-key header — both are supported.

# Bearer token
curl https://api.yomira.apis/v1/downloader/tiktok?url=... \
  -H "Authorization: Bearer ym_xxx"

# x-api-key header
curl https://api.yomira.apis/v1/downloader/tiktok?url=... \
  -H "x-api-key: ym_xxx"

API keys are stored only as sha256 hashes. The raw key is shown exactly once at creation time, in the dashboard. After that, the raw value is gone forever — Yomira support cannot retrieve it. If you lose a key, revoke it and create a new one.

Each key has a set of scopes that determine which services it can call. A wildcard scope (["*"]) grants access to all current and future APIs. Narrow scopes are recommended for production apps.

Rate Limits

Rate limits are per API key, per service, with a sliding window. The manifest declares the per-service limit (e.g. 60 requests / 60 seconds for TikTok). The gateway returns X-RateLimit-Limit, X-RateLimit-Remaining, and Retry-After headers on every response.

Hitting a rate limit returns a 429 with error code RATE_LIMIT_EXCEEDED. Your client should respect Retry-After and back off accordingly.

In addition to per-service rate limits, each subscription has a monthly quota. Hitting the monthly quota returns QUOTA_EXCEEDED — upgrade your plan or wait for the next billing period.

Engine Fallback

Every feature can be backed by multiple engines. When a request comes in, the gateway asks engine A first. If A fails (timeout, upstream 5xx, parse error), engine B is tried automatically. If B fails too, the gateway falls back to engine C. The retry budget is capped at three attempts — never infinite.

The response meta.attempts field lists which engines were tried, what error each returned, and how long the attempt took. Use this for debugging — the same key that works on the playground will surface the same attempts trail in production.

"meta": {
  "engine": "engine-b",
  "attempts": [
    { "engineId": "engine-a", "error": "rate-limited by upstream", "ms": 320 },
    { "engineId": "engine-b", "error": "", "ms": 540 }
  ]
}

This is what makes Yomira resilient: a single failing upstream never breaks your integration as long as one engine in the chain is healthy.

API Registry

Every API on the platform is described by a manifest. A manifest contains: id, name, description, category, version, runtime, status, endpoints (with parameters, examples, and OpenAPI fragments), authentication, and rateLimit.

The website reads the registry directly to render the catalog, the API detail page, the documentation examples, and the playground defaults. When you add a new manifest, it appears everywhere — no separate UI work needed.

Where possible, Yomira also exposes an OpenAPI fragment per endpoint (endpoint.openapiSpec) for tools that consume OpenAPI directly. This is optional but recommended.

Architecture

Yomira is modular by design. The layers, top to bottom:

  • Web / Docs — Next.js + Tailwind. Reads the registry, renders the catalog, docs, and playground.
  • Gateway — Node/TypeScript. Thin layer that handles auth, rate limit, quota, logging, validation, versioning, and routing. No business logic.
  • API Services — Independent services per category (downloader, ai, image, search, tools). Each can be Node, Python, Go, or Rust. They expose a clean internal HTTP contract.
  • Database — PostgreSQL / Supabase. Stores users, API keys, services, endpoints, usage, logs, subscriptions.
  • Cache — Redis-compatible. Used for rate limiting, counters, caching, and temporary data. Not the primary database.

The gateway never contains business logic. Adding a new API means: drop an engine module into services/<category>/engines/, append a manifest to the registry, and add a route case to the dispatcher. The gateway doesn't change.

Multi-runtime

We don't force every service to use the same language. The gateway runs on Node/TypeScript, the downloader is Node, AI and image are Python, performance-critical paths can be Go or Rust. Services communicate via a clean internal HTTP contract — the public API never changes when a service moves runtime.

When you adopt Yomira, you can start on the free tier (Cloudflare Workers / Pages / Supabase) and lift heavy services to a container or VPS later without touching your integration code.

Deployment

The free-first deployment target:

  • Frontend → Cloudflare Pages Free
  • Gateway → Cloudflare Workers Free
  • Database → Supabase Free
  • Cache → Upstash Free (Redis-compatible)
  • Source → GitHub

You can run the whole stack on free tiers for the first thousands of requests per month. When you outgrow the free tier, lift individual services to a VPS or container — the public API contract stays the same.