DEVELOPER API · CREDIT METERED

KE Media API

One API. Every model we run. Credits with a real margin.

Call fal, Replicate, Google, OpenAI, and xAI through kestudios.dev with a single kek_live_… key. Buy packs → generate image/video/edit/lipsync/music/TTS → we eat provider COGS, you ship product.

fal · 11 modelsreplicate · 7 modelsgoogle · 2 modelsopenai · 3 modelsxai · 2 models25+ curated · passthrough endpoints OK

One spend key

Buy a pack on /credits → get kek_live_…. Same key for Castingiron, Media API, and future KE products.

All providers

fal · Replicate · Google Gemini/Imagen · OpenAI images/TTS · xAI Grok Imagine. Platform keys stay ours; you never juggle five dashboards.

Spread built-in

List price is credit tiers above COGS. Volume packs (10–20% bonus) widen the funnel without killing unit margin.

Quickstart

Three calls

# 1) Buy credits → copy kek_live_… from success page
#    https://kestudios.dev/credits

export KE_KEY="kek_live_…"

# 2) List models + prices
curl -s https://kestudios.dev/api/v1/media/models | jq '.models[:5]'
curl -s https://kestudios.dev/api/v1/media/pricing | jq '.byTierKind'

# 3) Generate (charges credits; refunds on hard failure)
curl -s https://kestudios.dev/api/v1/media/generate \
  -H "Authorization: Bearer $KE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fal/flux-schnell",
    "prompt": "Product hero still, soft light, 4k",
    "aspect": "1:1",
    "ref": "job-001"
  }' | jq .

# Balance
curl -s https://kestudios.dev/api/v1/media/balance -H "Authorization: Bearer $KE_KEY" | jq .

# Passthrough any fal/Replicate endpoint you know:
curl -s https://kestudios.dev/api/v1/media/generate \
  -H "Authorization: Bearer $KE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "fal",
    "endpoint": "fal-ai/flux/dev",
    "kind": "image",
    "prompt": "Cinematic brand still"
  }'

Endpoints

  • GET /api/v1/media
  • GET /api/v1/media/models
  • GET /api/v1/media/pricing
  • GET /api/v1/media/balance
  • POST /api/v1/media/generate
  • GET /api/v1/media/jobs/:id
  • POST /api/credits/spend (generic debit)

Sample rates

1 credit = $0.10 list. Examples:

  • FLUX Schnell · 1 cr (image)
  • FLUX Pro · 5 cr (image)
  • Kling v1.6 · 35 cr (video)
  • OpenAI TTS · 1 cr (tts)
  • Grok Imagine · 2 cr (image)
Volume packs
Catalog

Curated models

Full live list: /api/v1/media/models. Pass provider + endpoint for anything not listed (priced at high tier).

ModelProviderKindCredits
FLUX Schnell
fal/flux-schnell
falimage1
FLUX Dev
fal/flux-dev
falimage2
FLUX Pro
fal/flux-pro
falimage5
FLUX Dev Image-to-Image
fal/flux-dev-i2i
faledit3
FLUX Kontext Pro
fal/flux-kontext
faledit6
Recraft V3
fal/recraft-v3
falimage2
AuraSR Upscale
fal/aura-sr
falupscale1
Stable Audio
fal/stable-audio
falmusic3
Sync Lipsync
fal/sync-lipsync
fallipsync10
Kling Video (fal)
fal/kling-video
falvideo35
MiniMax Video (fal)
fal/minimax-video
falvideo15
FLUX Schnell (Replicate)
replicate/flux-schnell
replicateimage1
FLUX Dev (Replicate)
replicate/flux-dev
replicateimage2
FLUX 1.1 Pro
replicate/flux-1.1-pro
replicateimage5
Ideogram V2A
replicate/ideogram-v2a
replicateimage2
SDXL
replicate/sdxl
replicateimage1
MiniMax Video-01
replicate/minimax-video
replicatevideo15
Kling v1.6
replicate/kling-v1.6
replicatevideo35
Gemini Flash Image
google/gemini-image
googleimage2
Imagen 3
google/imagen-3
googleimage5
GPT Image 1
openai/gpt-image-1
openaiimage5
DALL·E 3
openai/dall-e-3
openaiimage2
OpenAI TTS
openai/tts-1
openaitts1
Grok Imagine
xai/grok-imagine
xaiimage2
Grok Imagine Quality
xai/grok-imagine-quality
xaiimage5

Top up. Generate. Scale.

Credits power Media API + Castingiron + the rest of the KE product rail. Local KE Dev OS still uses your own provider keys for free BYO — this gateway is the hosted, billable surface.