Skip to main content

Documentation Index

Fetch the complete documentation index at: https://rimp.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you from zero to a successful image generation, then a video generation. Prerequisites: an account at app.rimp.example and an API key from Settings → API keys.

1. Set your API key

export RIMP_API_KEY="sk_live_..."

2. Generate an image (synchronous)

Image models with sub-30s latency are returned directly in the response.
curl -X POST https://api.rimp.example/v1/images \
  -H "Authorization: Bearer $RIMP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "model": "flux-pro",
    "prompt": "a red rimp on brushed chrome, studio lighting"
  }'
Response:
{
  "id": "gen_abc123",
  "object": "generation",
  "status": "succeeded",
  "modality": "image",
  "charged_credits": 40,
  "outputs": [
    {
      "id": "out_xyz",
      "url": "https://cdn.rimp.example/...",
      "mime": "image/png",
      "width": 1024,
      "height": 1024
    }
  ]
}

3. Generate a video (asynchronous)

Video generation returns 202 Accepted immediately. Poll the generation or subscribe to a webhook.
const job = await client.generations.createVideo({
  model: 'veo-3-1-fast',
  prompt: 'slow motion ocean waves crashing on dark volcanic rocks',
  duration_s: 4,
});

// Wait helper polls every 2s, up to 30 minutes
const final = await client.generations.waitFor(job.id);
console.log(final.outputs[0].url);

4. Compare multiple models in one call

This is Rimp’s headline feature — same prompt, N models, atomic credit reservation.
const cmp = await client.comparisons.create({
  prompt: 'cinematic portrait of a fisherman at golden hour, 35mm film',
  models: ['flux-pro', 'imagen-4', 'ideogram-v2'],
  params_shared: { aspect_ratio: '1:1' },
});

// Poll once, get all three results
const result = await client.comparisons.waitFor(cmp.id);
result.generations.forEach((g) => console.log(g.model, g.outputs[0].url));
If your wallet can’t cover the sum of all three estimates, the API returns 402 Insufficient credits before charging anything.

Next steps

Authentication

Bearer tokens, scoping, rotation, and IP allowlist.

Multi-model deep dive

How routing, capabilities, and pricing work across providers.

Webhooks

Receive generation.completed events instead of polling.

Idempotency

Safely retry without double-charging.