Documentation Index
Fetch the complete documentation index at: https://docs.rimp.io/llms.txt
Use this file to discover all available pages before exploring further.
If you don’t want an SDK, just use curl. All endpoints are documented in the API Reference; these recipes cover the most common flows.
Setup
export RIMP_API_KEY="sk_live_..."
export RIMP_API="https://api.rimp.example"
First image
curl -X POST "$RIMP_API/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 chrome"
}' | jq .
Queue a video, then poll
JOB=$(curl -s -X POST "$RIMP_API/v1/videos" \
-H "Authorization: Bearer $RIMP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ "model": "veo-3-1-fast", "prompt": "waves", "duration_s": 4 }' \
| jq -r .id)
echo "Queued $JOB"
# Poll every 3s until terminal
while true; do
STATUS=$(curl -s -H "Authorization: Bearer $RIMP_API_KEY" \
"$RIMP_API/v1/generations/$JOB" | jq -r .status)
echo "$JOB → $STATUS"
case "$STATUS" in
succeeded|failed|canceled) break ;;
esac
sleep 3
done
curl -s -H "Authorization: Bearer $RIMP_API_KEY" \
"$RIMP_API/v1/generations/$JOB" | jq '.outputs[0].url'
Multi-model comparison
curl -X POST "$RIMP_API/v1/comparisons" \
-H "Authorization: Bearer $RIMP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"prompt": "cinematic portrait at golden hour",
"models": ["flux-pro", "imagen-4", "ideogram-v2"],
"params_shared": { "aspect_ratio": "1:1" }
}' | jq .
Register a webhook
curl -X POST "$RIMP_API/v1/webhooks" \
-H "Authorization: Bearer $RIMP_API_KEY" \
-d '{
"url": "https://app.example/webhooks/rimp",
"events": ["generation.completed", "generation.failed"]
}' | jq .
The response includes secret — save it now for signature verification.
Test a webhook signature locally
SECRET="whsec_..."
BODY='{"id":"evt_test","type":"generation.completed","data":{}}'
TS=$(date +%s)
SIG=$(printf '%s.%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}')
curl -X POST http://localhost:3000/webhooks/rimp \
-H "Content-Type: application/json" \
-H "X-Rimp-Signature: t=$TS,v1=$SIG" \
-d "$BODY"
Usage report
curl -G "$RIMP_API/v1/usage" \
-H "Authorization: Bearer $RIMP_API_KEY" \
--data-urlencode "start=2026-05-01T00:00:00Z" \
--data-urlencode "end=2026-05-31T23:59:59Z" \
--data-urlencode "group_by=model" | jq .
Useful jq snippets
# Just the URL of the first output
curl ... | jq -r '.outputs[0].url'
# Total credits spent so far this month
curl ... /v1/usage?group_by=day | jq '[.data[].total_usd | tonumber] | add'
# Models that support image-to-video
curl ... /v1/models | jq '.data[] | select(.capabilities | index("image_to_video")) | .slug'