Migrating from Sora or DALL-E? Use promo code DALLE1000 for $10 in free API credits!
Sub-Second Streaming

Stream AI Media in Real Time

Sub-second TTFB, native Server-Sent Events, and 50 parallel requests per key. Built for conversational video AI, avatar pipelines, and high-throughput media generation.

<800ms

Time-to-First-Byte

First SSE event

50

Parallel Requests

Per API key

Native

SSE Streaming

Real-time progress

99.9%

Uptime SLA

Enterprise-grade

Server-Sent Events

Stream Generation Progress in Real Time

Open a single SSE connection and receive progress updates, intermediate results, and completion events as they happen. No polling, no WebSocket complexity.

Python β€” SSE Image Streaming
import httpx

# Stream image generation progress via SSE
def stream_image_generation(prompt: str, api_key: str):
    url = "https://api.creativeai.run/v1/images/generations/stream"
    headers = {
        "Authorization": f"Bearer {api_key}",
        "Accept": "text/event-stream",
    }
    payload = {
        "model": "seedream-3",
        "prompt": prompt,
        "size": "1024x1024",
        "stream": True,
    }

    with httpx.stream("POST", url, json=payload, headers=headers, timeout=60) as r:
        for line in r.iter_lines():
            if line.startswith("data: "):
                data = json.loads(line[6:])
                if data.get("status") == "progress":
                    print(f"Progress: {data['percent']}%")
                elif data.get("status") == "complete":
                    print(f"Image URL: {data['url']}")
                    return data["url"]

# Sub-second TTFB β€” first SSE event arrives in <800ms
url = stream_image_generation(
    "cinematic portrait, golden hour lighting",
    api_key="YOUR_CREATIVEAI_KEY",
)
Node.js β€” SSE Video Streaming
const EventSource = require("eventsource");

function streamVideoGeneration(prompt, apiKey) {
  return new Promise((resolve, reject) => {
    const url = "https://api.creativeai.run/v1/videos/generations/stream";
    const es = new EventSource(url, {
      headers: {
        Authorization: `Bearer ${apiKey}`,
        "Content-Type": "application/json",
      },
      // POST body for SSE connection
      body: JSON.stringify({
        model: "kling-v2",
        prompt,
        duration: 5,
        stream: true,
      }),
    });

    es.addEventListener("progress", (e) => {
      const data = JSON.parse(e.data);
      console.log(`Video progress: ${data.percent}%`);
    });

    es.addEventListener("complete", (e) => {
      const data = JSON.parse(e.data);
      console.log(`Video ready: ${data.url}`);
      es.close();
      resolve(data.url);
    });

    es.addEventListener("error", (e) => {
      es.close();
      reject(new Error("Stream error"));
    });
  });
}

// First progress event arrives in <1s
const videoUrl = await streamVideoGeneration(
  "smooth camera orbit around a product bottle, studio lighting",
  "YOUR_CREATIVEAI_KEY"
);
High Concurrency

50 Parallel Requests per API Key

Fire 50 generation requests simultaneously. Process entire product catalogs, avatar batches, or thumbnail grids in a single burst.

Python β€” 50 Concurrent Generations
import asyncio
import httpx

API_KEY = "YOUR_CREATIVEAI_KEY"
BASE_URL = "https://api.creativeai.run/v1"

async def generate_image(client: httpx.AsyncClient, prompt: str) -> dict:
    """Fire a single generation request."""
    resp = await client.post(
        f"{BASE_URL}/images/generations",
        json={"model": "seedream-3", "prompt": prompt, "size": "1024x1024"},
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=30,
    )
    resp.raise_for_status()
    return resp.json()

async def batch_generate(prompts: list[str]) -> list[dict]:
    """Run up to 50 concurrent image generations."""
    async with httpx.AsyncClient() as client:
        tasks = [generate_image(client, p) for p in prompts]
        results = await asyncio.gather(*tasks)
    return results

# Generate 50 images in parallel β€” all hit the API simultaneously
prompts = [f"product photo variant {i}, white background" for i in range(50)]
results = asyncio.run(batch_generate(prompts))
print(f"Generated {len(results)} images concurrently")
Frontend Integration

Drop-In React Hook for SSE Streaming

Use the native Fetch API ReadableStream to consume SSE events in React. Progress state updates your UI frame-by-frame.

React β€” useStreamGeneration Hook
import { useCallback, useState } from "react";

export function useStreamGeneration() {
  const [progress, setProgress] = useState(0);
  const [result, setResult] = useState<string | null>(null);

  const generate = useCallback(async (prompt: string) => {
    setProgress(0);
    setResult(null);

    const resp = await fetch(
      "https://api.creativeai.run/v1/images/generations/stream",
      {
        method: "POST",
        headers: {
          Authorization: `Bearer ${process.env.NEXT_PUBLIC_API_KEY}`,
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          model: "seedream-3",
          prompt,
          stream: true,
        }),
      }
    );

    const reader = resp.body!.getReader();
    const decoder = new TextDecoder();
    let buffer = "";

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

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

      for (const line of lines) {
        if (!line.startsWith("data: ")) continue;
        const data = JSON.parse(line.slice(6));
        if (data.status === "progress") setProgress(data.percent);
        if (data.status === "complete") setResult(data.url);
      }
    }
  }, []);

  return { generate, progress, result };
}

Built for Speed & Scale

Every layer of the stack is optimized for low latency and high throughput.

Sub-Second TTFB

First progress event arrives in under 800ms. Your UI starts updating before the image is even half-rendered β€” no more blank loading screens.

50 Parallel Requests

Fire up to 50 concurrent generation requests per API key. Process entire product catalogs, avatar batches, or thumbnail grids in seconds, not minutes.

Server-Sent Events

Native SSE support streams generation progress in real time. Get percentage updates, intermediate frames, and completion notifications over a single HTTP connection.

Real-Time Video Streaming

Stream video generation progress for conversational AI, avatar lip-sync, and live product demos. Know exactly when each frame is ready.

Adaptive Rate Limiting

Intelligent rate limiting adjusts to your usage pattern. Burst up to 50 requests, sustain high throughput, and scale with your traffic without manual limit increases.

Edge-Optimized Infrastructure

Requests route to the nearest GPU cluster. Connection pooling and keep-alive reduce overhead so every millisecond of your TTFB budget goes toward generation.

Global Low Latency

GPU clusters in multiple regions ensure consistent sub-second TTFB regardless of where your users are located. No cold starts.

OpenAI-Compatible SDK

Drop-in replacement for OpenAI image endpoints. Switch your base_url, keep your existing code, and gain streaming + concurrency for free.

CreativeAI vs. Typical AI APIs

Most AI image/video APIs force you to poll. We stream.

FeatureCreativeAITypical AI API
Time-to-First-Byte <800ms2-5s
Parallel Requests / Key 505-10
SSE Streaming NativePolling only
Progress Updates Real-time %None
Video Generation Streaming SSE + WebhooksWebhook only
Cold Start None (warm pools)5-30s
Pricing Model Pay-per-useSubscription + overage
SDK Compatibility OpenAI drop-inCustom SDK

Who This Is For

Real-time streaming and high concurrency unlock use cases that polling-based APIs cannot serve.

Conversational Video AI

Tavus, Zoice, HeyGen

Stream avatar video frames with sub-second latency for real-time conversations. SSE delivers frame-by-frame progress so your UI stays responsive.

AI SaaS Platforms

302.AI, PiAPI, NovitaAI

Serve hundreds of end-users concurrently with 50 parallel requests per key. Stream progress to each user's browser via SSE pass-through.

Real-Time Product Photography

Shopify Apps, E-commerce Tools

Generate 50 product photo variants simultaneously. Sub-second TTFB means your merchants see previews almost instantly.

Live Content Pipelines

AdTech, Newsletter Platforms

Generate ad creatives and newsletter visuals on-the-fly. Streaming lets your pipeline start post-processing before generation completes.

Start Streaming in Minutes

Get an API key, add stream: true to your request, and start receiving real-time SSE events. Pay only for what you generate.