Create posts through the Reimagix API

Supply photos, text and a style kit. Reimagix composes PNG images, PNG carousels or silent MP4 videos using your existing account credits.

Check API capabilities for available output formats before submitting work. The API returns 503 when unavailable.

1. Connect your account

Verify your email, then create a named key with a lifetime credit allowance in the dashboard. The secret is shown once. Store it securely as REIMAGIX_API_KEY; never put it in URLs, public code or chat messages.

export REIMAGIX_API_BASE='https://api.reimagix.com/v1'
curl "$REIMAGIX_API_BASE/account" \
  -H "Authorization: Bearer $REIMAGIX_API_KEY"

2. Choose a style kit and photos

List your kits with GET /style-kits, or create one with a name, primary_color and secondary_color. Supported fonts and field limits are in capabilities. Upload a photo or import a public HTTPS image with POST /assets/import. Imports are copied to your private account storage.

curl "$REIMAGIX_API_BASE/style-kits" -H "Authorization: Bearer $REIMAGIX_API_KEY"
curl "$REIMAGIX_API_BASE/assets" \
  -H "Authorization: Bearer $REIMAGIX_API_KEY" \
  -F 'image=@photo.jpg'

3. Quote the output

Use the returned kit and asset IDs in a generation request. Quotes validate your inputs and return the exact cost without spending credits. They expire after ten minutes.

Download the validated Image, Carousel and Video request examples. Replace their placeholder IDs with your own and save the chosen request as creative.json.

curl "$REIMAGIX_API_BASE/quotes" \
  -H "Authorization: Bearer $REIMAGIX_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @creative.json

Image requests use image; Carousel and Video requests use ordered sequence text and photos. Five or seven scenes are targets; sparse content produces fewer scenes. Your agent supplies the words and photos.

4. Submit, poll and download

After checking the quote against your spending instructions, submit its ID. Keep the same idempotency key when retrying a timed-out request. A 202 response includes the job ID and status URL.

curl "$REIMAGIX_API_BASE/jobs" \
  -H "Authorization: Bearer $REIMAGIX_API_KEY" \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: my-post-request-0001' \
  -d '{"quote_id":"YOUR_QUOTE_ID"}'

Poll the returned status URL starting after five seconds, backing off to thirty seconds. Respect Retry-After. Download each artifact with the same Authorization header. Byte-range requests are supported.

Credits and key allowance are reserved together. Each successful output settles once; each failed output refunds once. A failed job can still contain successful outputs. Results remain in your account until you delete them or normal retention rules apply.

To share an output without exposing your key, request POST /artifacts/{id}/share. The returned link is accessible to anyone holding it and expires after one hour. Delete terminal jobs with DELETE /jobs/{id}.

Errors and limits

Errors contain error.code, error.message and request_id. Keep the request ID for support. The initial limit is 60 requests per minute per key, with an additional account limit. A 429 response includes Retry-After.

Authentication failures return 401, insufficient credits or allowance return 402, conflicting requests or expired quotes return 409, and invalid inputs return 422. A retry of a deleted job returns 410 and cannot create another charge. Follow the authoritative OpenAPI and agent guide for the full contract.