Genspicy API
Generate images and videos from Genspicy templates. Build your workflow with a simple REST API.
Get your API key →Start building
- Get an API key. Recharge at least $100 in API credits, generate your key, then pass it in the
X-API-Keyheader on every request. - Choose a template. List templates to find its
id, credit cost and the inputs it needs. - Make a generation. Upload any input files, create a generation, then poll Get a generation for the result.
Base URL
https://openapi.genspicy.ai/openapi/v1Local replica: the address above is how the public gateway is written, for reference only. This build proxies the same-origin /api/v1 prefix to the backend, so calls use relative paths (for example /api/v1/user.whoami) and never leave the host.
Requests and responses use JSON. Successful responses return code: 0, message and data. Failed requests return a non-zero error code and a message.
Explore the API
Authentication
Two credentials exist. Browser sessions use a JWT in the Authorization: Bearer header (guests are created automatically on first visit). Server-to-server integrations use an API key in the X-API-Key header.
Guests are real accounts: POST /api/v1/user-guest.sign-up returns an access token and a refresh token, and everything generated on that account belongs to it.
Generation workflow
A generation moves through pending → processing → succeeded. Diamonds are pre-charged when the job is accepted, and refunded in full if it fails.
- pending queued, worker has not picked it up yet
- processing upstream model is rendering
- succeeded
output_urlis ready - failed
error_messageset, diamonds refunded
Poll GET /api/v1/user-generation-content.get?id= every 10 seconds.
Get account
/api/v1/user.whoamiReturns the authenticated account, its VIP level and diamond balance.
List templates
/api/v1/generation-template.recommend-listPaginated template catalogue. The explore feed, drama channel and tag pages all read from here.
pageoptional1-based page number, default 1
page_sizeoptionalitems per page, max 100, default 100
statusoptionalpublished | draft | archived
keywordoptionalfree text search on name and tags
display_sceneoptionalexplore | drama
Create an upload URL
No presigned upload endpoint is exposed by this API. Templates that need media take publicly reachable URLs directly, in the input_medias array of Create a generation.
typerequiredimage | video
urlrequiredpublicly reachable media URL or same-origin /media/... path
descriptionoptionalfree text shown next to the input
{ "input_medias": [ { "type": "image", "url": "/media/images/<hash>.webp", "description": "portrait" } ]}Create a generation
/api/v1/user-generation-content.createQueues a generation. Diamonds are pre-charged; a rejection before the charge returns 4xx without touching the balance.
template_idrequiredtemplate uuid from List templates
promptoptionalextra direction appended to the template prompt
selected_featuresoptionalarray of feature names
input_mediasoptionalarray of { type, url, description? } media inputs
durationoptionalclip length in seconds, when the template allows it
extend_videooptionalextend the clip by extend_cost diamonds
Get a generation
/api/v1/user-generation-content.getPoll the state of one generation. Poll no faster than every 10 seconds.
idrequiredgeneration uuid
List generations
/api/v1/user-generation-content.listYour collection, newest first.
pageoptionalpage number
page_sizeoptionalitems per page
Generation statuses
pendingprocessingsucceededfailedcanceled
A failed generation always writes a refund ledger entry. The UI shows “Diamonds have been refunded to your account.” so the balance change is never silent.
Rate limits
- 10 concurrent generations per user — beyond that the API answers
429 - List endpoints: 60 requests / minute
- Polling: 1 request / 10 s per generation
Errors
| code | meaning |
|---|---|
| 0 | ok |
| 10001 | bad request (missing / wrong typed parameter) |
| 10002 | invalid gender |
| 10011 | invalid code type |
| 10022 | unauthorized (token invalid or expired) |
| 10026 | invalid generation template status |
API keys
Server integrations authenticate with X-API-Key. Keys inherit the diamond balance of the account that created them.
This build ships the public site only; key management lives in the dashboard of the deployed service.