Genspicy Developers API docsv1 API keys
Get started Overview

Genspicy API

Generate images and videos from Genspicy templates. Build your workflow with a simple REST API.

Get your API key →

Start building

  1. Get an API key. Recharge at least $100 in API credits, generate your key, then pass it in the X-API-Key header on every request.
  2. Choose a template. List templates to find its id, credit cost and the inputs it needs.
  3. Make a generation. Upload any input files, create a generation, then poll Get a generation for the result.

Base URL

API base URL
https://openapi.genspicy.ai/openapi/v1

Local 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

Get started Authentication

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.

Get started Generation workflow

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_url is ready
  • failed error_message set, diamonds refunded

Poll GET /api/v1/user-generation-content.get?id= every 10 seconds.

API reference Get account

Get account

GET/api/v1/user.whoami

Returns the authenticated account, its VIP level and diamond balance.

API reference List templates

List templates

GET/api/v1/generation-template.recommend-list

Paginated template catalogue. The explore feed, drama channel and tag pages all read from here.

pageoptional

1-based page number, default 1

page_sizeoptional

items per page, max 100, default 100

statusoptional

published | draft | archived

keywordoptional

free text search on name and tags

display_sceneoptional

explore | drama

API reference Create an upload URL

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.

The admin-only POST /api/v1/admin/upload is not part of the public API. Public integrations always pass media addresses through input_medias.
typerequired

image | video

urlrequired

publicly reachable media URL or same-origin /media/... path

descriptionoptional

free text shown next to the input

input_medias
{  "input_medias": [    {      "type": "image",      "url": "/media/images/<hash>.webp",      "description": "portrait"    }  ]}
API reference Create a generation

Create a generation

POST/api/v1/user-generation-content.create

Queues a generation. Diamonds are pre-charged; a rejection before the charge returns 4xx without touching the balance.

template_idrequired

template uuid from List templates

promptoptional

extra direction appended to the template prompt

selected_featuresoptional

array of feature names

input_mediasoptional

array of { type, url, description? } media inputs

durationoptional

clip length in seconds, when the template allows it

extend_videooptional

extend the clip by extend_cost diamonds

API reference Get a generation

Get a generation

GET/api/v1/user-generation-content.get

Poll the state of one generation. Poll no faster than every 10 seconds.

idrequired

generation uuid

API reference List generations

List generations

GET/api/v1/user-generation-content.list

Your collection, newest first.

pageoptional

page number

page_sizeoptional

items per page

Guides Generation statuses

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.

Guides Rate limits

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
Guides Errors

Errors

codemeaning
0ok
10001bad request (missing / wrong typed parameter)
10002invalid gender
10011invalid code type
10022unauthorized (token invalid or expired)
10026invalid generation template status
Get started API keys

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.