Make a slideshow in a post's look
Make a slideshow in a post's look with the Wavegrain Carousel API: POST /api/v1/slideshows/copies. Parameters, request body, responses and an example request.
POST /api/v1/slideshows/copies is part of the Carousel API. Every call needs an access key: see Authentication.
Needs the generate permission.
Copies the look of an Instagram post or reel, a TikTok photo post or an X post (url), never its words, photos or branding, and makes a new tailored slideshow about topic (or the post's own subject) in your brand's voice. A saved styleId reuses a look without a link. It answers a job at once.
The look is free; the slideshow costs credits only when it is made, with up to aiImages AI images on top.
Parameters
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
Idempotency-Key | header | string | no | Your own key for this request, so a retry answers the same job and never pays twice. |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | no | The post to copy: an Instagram post or reel, a TikTok photo post, or an X post. |
styleId | string | no | A saved tailored style to reuse instead of copying a new look, such as the styleId an earlier copy_post answered. With it, url is optional. |
topic | string | no | What the new post is about. Leave out to retell the copied post's own subject in new words. Required when there is no url. |
slideCount | integer | no | How many slides the copy has. Default: as many as the copied post (7 for a reel). |
brandId | string | no | Whose voice, colours and CTA. Default: your active brand. |
aiImages | integer | no | How many AI images it may make when no real photo fits; each costs extra credits. 0 uses real photos only. |
maxCredits | integer | yes | The most credits this call may spend. It is refused, spending nothing, if it could cost more. |
Example request
curl -X POST https://wavegrain.com/api/v1/slideshows/copies \
-H "Authorization: Bearer $WAVEGRAIN_KEY" -H "Content-Type: application/json" \
-d '{"url":"https://www.instagram.com/p/C9xYz/","topic":"Three ways to keep rice fluffy","maxCredits":8}'
Responses
| Status | Meaning |
|---|---|
| 202 | The job. |
| 400 | The body is not valid (details names the field), or the request cannot be done as asked, such as maxCredits below the price. |
| 401 | No access key, or an unknown, revoked or expired one |
| 402 | Not enough credits, the plan ended, or the credits are on hold; nothing was spent. |
| 403 | The key lacks the permission, or the account has no active plan |
| 404 | No such style or brand of yours. |
| 409 | The Idempotency-Key was used for another request, or that request is still running. |
| 429 | Too many requests, this month's slideshows are used, or the key's daily credit limit is reached; nothing was spent. |
| 500 | Something went wrong on Wavegrain's side; try again, and send the request id if it keeps failing. |
| 503 | Wavegrain could not start the job; nothing was spent. Try again in a minute. |
A successful answer:
{
"id": "mcpgen_3Ha7Wd",
"kind": "tailored",
"state": "writing",
"creditsReserved": 8
}
More in the Carousel API
- Estimate a slideshow's price:
POST /api/v1/slideshows/estimate - Make a slideshow from a topic:
POST /api/v1/slideshows - List slideshows:
GET /api/v1/slideshows - Follow a slideshow job:
GET /api/v1/jobs/{id} - Get a slideshow:
GET /api/v1/slideshows/{id} - Download a slideshow:
POST /api/v1/slideshows/{id}/export - All endpoints
Something wrong or missing? Write to support@wavegrain.com.