API reference
Generation API
Generate AI content
BetaUpdated
- Base URL
- https://reelmirror.com/api
- Authentication
- Authorization: Bearer rm_…
- Contract
- openapi.json
Generate from source post
POST/v1/generate
Trigger AI content generation from a synced source post. Debits balance per media item + caption.
Request body application/json
source_post_idstringrequireduuidpersona_idstringrequireduuidauto_publishbooleandefault falseWhen true, automatically publish to persona's connected accounts when generation completes
Response 202
Generation started Fields below are inside data.
idstringThe generated post ID
statusstringOne of
started
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"
}'const response = await fetch(`https://reelmirror.com/api/v1/generate`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"source_post_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20"
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/generate",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"source_post_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"persona_id": "c9f0f895-fb98-4b91-9e3f-1d2a6b7c8d20"
},
)
payload = response.json(){
"data": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"status": "started"
}
}Regenerate media item
POST/v1/generate/media-item
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.
idstringThe new generated media item ID
statusstringOne of
started
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"
}'const response = await fetch(`https://reelmirror.com/api/v1/generate/media-item`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/generate/media-item",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
},
)
payload = response.json(){
"data": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"status": "started"
}
}Voice convert video
POST/v1/generate/voice-convert
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.
idstringThe generated media item ID
statusstringOne of
started
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"
}'const response = await fetch(`https://reelmirror.com/api/v1/generate/voice-convert`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/generate/voice-convert",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
},
)
payload = response.json(){
"data": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"status": "started"
}
}Toggle public visibility
POST/v1/generate/toggle-public
Make a generated media item public or private. Discounted public items are locked for 20 days.
Request body application/json
generated_media_item_idstringrequireduuidis_publicbooleanrequired
Response 200
Visibility updated Fields below are inside data.
idstringis_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
}'const response = await fetch(`https://reelmirror.com/api/v1/generate/toggle-public`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"is_public": true
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/generate/toggle-public",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"generated_media_item_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"is_public": True
},
)
payload = response.json(){
"data": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"is_public": true
}
}Clone from Instagram URL
POST/v1/clone-url
Fetch a single Instagram post by URL and generate AI content from it in one step.
Request body application/json
urlstringrequiredInstagram post/reel/TV URL
persona_idstringrequireduuid
Response 202
Clone started Fields below are inside data.
idstringThe generated post ID
statusstringOne of
started
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"
}'const response = await fetch(`https://reelmirror.com/api/v1/clone-url`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://reelmirror.com/…",
"persona_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/clone-url",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"url": "https://reelmirror.com/…",
"persona_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
},
)
payload = response.json(){
"data": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"status": "started"
}
}Regenerate post
POST/v1/generate/regenerate-post
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_idstringrequireduuidfailed_onlybooleandefault falseWhen 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
idstringThe generated post ID
statusstringOne of
started
Option 2
Failed-only retry response
idstringThe generated post ID
statusstringOne of
startedretried_itemsarray of object4 item attributes
original_item_idstringuuidnew_item_idstringuuidmedia_typestringOne of
imagevideostatusstringOne of
pending
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"
}'const response = await fetch(`https://reelmirror.com/api/v1/generate/regenerate-post`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.REELMIRROR_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"generated_post_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
}),
});
const payload = await response.json();import os
import requests
response = requests.request(
"POST",
f"https://reelmirror.com/api/v1/generate/regenerate-post",
headers={
"Authorization": f"Bearer {os.environ['REELMIRROR_API_KEY']}",
},
json={
"generated_post_id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10"
},
)
payload = response.json(){
"data": {
"id": "8f14e45f-ceea-4e7a-9c2d-3b1a5f2e7c10",
"status": "started"
}
}