Skip to content
INFRO

Documentation

Overview

INFRO is one API for text, image, video, and audio models, with automatic routing and failover, per-unit pricing at or below list, and a single bill.


INFRO sits between your application and the AI ecosystem. You call one API; INFRO picks a route for each request, retries elsewhere when a route degrades, meters exactly what you used, and bills it all to one balance.

Text, image, video, and audio share the same base URL, the same key, the same error model, and the same request extensions. Adding a modality is a new call, not a new integration.

Base URL
https://api.infro.io/v1

What you get

  • One integration, every modality. Chat completions, image generation and editing, video generation, speech synthesis, and transcription — all documented under Modalities.
  • Prices at or below direct. You pay at or under what the same call costs going direct. The largest reductions are on image, video, audio, and open-weight text; models priced at list are labelled as such in the catalog.
  • Uptime beyond any one route. Health-aware routing plus failover and fallbacks keep your product returning results through upstream incidents.
  • Every request, on the record. Request-level traces carry the model, route, latency, and exact cost — grouped by your users and sessions, exportable to your stack.
  • One bill, full attribution. Per-key spend limits, request-level usage export, and cost broken down by model, project, and key — see Rate & spend limits.
  • Governance built in. Members and roles, spend ceilings, model allowlists, and an audit log — one account the whole company can use.

The endpoints

ModalityEndpointShapeBilled per
TextPOST /v1/chat/completionsSynchronous or streamingToken
ImagePOST /v1/images/generationsSynchronousImage
VideoPOST /v1/videosAsync job + webhookSecond of output
SpeechPOST /v1/audio/speechSynchronous or streamingCharacter
TranscriptionPOST /v1/audio/transcriptionsSynchronousHour of audio

How a request flows

  1. Your app calls an endpoint with an INFRO API key and a model id like bfl/flux-2-pro.
  2. INFRO validates the key and checks your spend and rate budgets.
  3. The router scores every healthy route serving that model on price, latency, and live error rate, then forwards the request in that route's native format.
  4. If the route times out or returns 5xx before the response begins, INFRO retries the next-best route — and can fall back to another model if you configured fallbacks. Once a response has started streaming, a drop surfaces as an error your client retries.
  5. Long-running work (video, large batches) becomes an async job you receive by webhook.
  6. Usage is metered per unit and appears in your dashboard and export within seconds, including the exact usage.cost on every response.

Routing adds under 40ms of overhead in the common case — noise against generation time, but measure on your own traffic if you stream audio or otherwise care about time-to-first-byte.

A complete request

import os
from infro import Infro

client = Infro(api_key=os.environ["INFRO_API_KEY"])

image = client.images.generate(
    model="bfl/flux-2-pro",
    prompt="studio product shot, soft rim light",
)
print(image.data[0].url, image.usage.cost)

Text requests keep the OpenAI-compatible shape, so an existing OpenAI integration only needs a new base URL and key — see Chat completions.

Where to go next