Skip to content

API reference

Generation API

Generate AI content

Beta

Base URL
https://reelmirror.com/api
Authentication
Authorization: Bearer rm_…
Contract
openapi.json

Generate from source post

POST/v1/generate

Bearer token

Trigger AI content generation from a synced source post. Debits balance per media item + caption.

Request body application/json

  • source_post_idstringrequireduuid
  • persona_idstringrequireduuid
  • auto_publishbooleandefault false

    When true, automatically publish to persona's connected accounts when generation completes

Response 202

Generation started Fields below are inside data.

  • idstring

    The generated post ID

  • statusstring

    One ofstarted

curl -X POST "https://reelmirror.com/api/v1/generate" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "source_post_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
  "persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20"
}'
Response 202 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "status": "started"
  }
}

Regenerate media item

POST/v1/generate/media-item

Bearer token

Create a new version of a generated media item.

Request body application/json

  • generated_media_item_idstringrequireduuid

Response 202

Regeneration started Fields below are inside data.

  • idstring

    The new generated media item ID

  • statusstring

    One ofstarted

curl -X POST "https://reelmirror.com/api/v1/generate/media-item" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}'
Response 202 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "status": "started"
  }
}

Voice convert video

POST/v1/generate/voice-convert

Bearer token

Apply voice conversion to a completed generated video. Requires persona to have a voice sample.

Request body application/json

  • generated_media_item_idstringrequireduuid

Response 202

Voice conversion started Fields below are inside data.

  • idstring

    The generated media item ID

  • statusstring

    One ofstarted

curl -X POST "https://reelmirror.com/api/v1/generate/voice-convert" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}'
Response 202 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "status": "started"
  }
}

Toggle public visibility

POST/v1/generate/toggle-public

Bearer token

Make a generated media item public or private. Discounted public items are locked for 20 days.

Request body application/json

  • generated_media_item_idstringrequireduuid
  • is_publicbooleanrequired

Response 200

Visibility updated Fields below are inside data.

  • idstring
  • is_publicboolean
curl -X POST "https://reelmirror.com/api/v1/generate/toggle-public" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
  "is_public": true
}'
Response 200 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "is_public": true
  }
}

Clone from Instagram URL

POST/v1/clone-url

Bearer token

Fetch a single Instagram post by URL and generate AI content from it in one step.

Request body application/json

  • urlstringrequired

    Instagram post/reel/TV URL

  • persona_idstringrequireduuid

Response 202

Clone started Fields below are inside data.

  • idstring

    The generated post ID

  • statusstring

    One ofstarted

curl -X POST "https://reelmirror.com/api/v1/clone-url" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://reelmirror.com/…",
  "persona_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}'
Response 202 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "status": "started"
  }
}

Regenerate post

POST/v1/generate/regenerate-post

Bearer token

Regenerate a generated post. By default, soft-deletes all existing media items and re-triggers generation from scratch. When failed_only is true, retries only failed media items without touching completed ones or the caption.

Request body application/json

  • generated_post_idstringrequireduuid
  • failed_onlybooleandefault false

    When true, retry only failed media items instead of regenerating the entire post.

Response 202

Regeneration started. When `failed_only` is true, the response includes `retried_items` and `total_cost_cents`. Fields below are inside data.

One of 2 shapes:

Option 1

Full regeneration response

  • idstring

    The generated post ID

  • statusstring

    One ofstarted

Option 2

Failed-only retry response

  • idstring

    The generated post ID

  • statusstring

    One ofstarted

  • retried_itemsarray of object
    4 item attributes
    • original_item_idstringuuid
    • new_item_idstringuuid
    • media_typestring

      One ofimagevideo

    • statusstring

      One ofpending

  • total_cost_centsinteger

Errors 422 use the standard error format.

curl -X POST "https://reelmirror.com/api/v1/generate/regenerate-post" \
  -H "Authorization: Bearer $REELMIRROR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "generated_post_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}'
Response 202 (example)
{
  "data": {
    "id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
    "status": "started"
  }
}