CharGen Generations API
Dispatch render generations (image, video, audio, 3D) and poll the status, assets and results of EVERY generation, including entities.
Dispatch render generations (image, video, audio, 3D) and poll the status, assets and results of EVERY generation, including entities.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/char-gen-com:char-gen-com-generations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: CharGen Partner Generations API
description: 'Wholesale generation API for images, video, audio, 3D models and structured D&D entities. Authenticate every call with `Authorization: Bearer YOUR_API_KEY` (keys are minted in the developer portal at char-gen.com/developers). Generations are asynchronous: POST returns 202 with an id, poll GET /partner/v1/generations/{id} for status and results (renders on POST /partner/v1/generations, structured D&D entities on POST /partner/v1/entities). Billing is a prepaid USD wallet; GET /partner/v1/models lists your per-model prices.'
version: v1
servers:
- url: https://api.char-gen.com
description: Production
tags:
- name: Generations
description: Dispatch render generations (image, video, audio, 3D) and poll the status, assets and results of EVERY generation, including entities.
paths:
/partner/v1/generations:
get:
tags:
- Generations
summary: List generations
description: 'Most-recent-first list of this account''s generations across BOTH families (render and entity). Rows are lean (id, kind, type, status, createdAt) - poll GET /partner/v1/generations/{id} for the full result, assets and any failure reason. Cursor-paginated: pass the returned `nextCursor` back as `before` to fetch the next page; a null cursor means there are no more rows. Requires the `read` scope. `limit` defaults to 20 (max 100).'
operationId: list
parameters:
- name: limit
in: query
required: false
schema:
type: integer
format: int32
- name: before
in: query
required: false
schema:
type: string
responses:
'200':
description: OK
content:
'*/*':
schema:
type: object
'400':
description: Bad Request
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'401':
description: Unauthorized
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'402':
description: Payment Required
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'404':
description: Not Found
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'409':
description: Conflict
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'422':
description: Unprocessable Entity
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
post:
tags:
- Generations
summary: Dispatch a render generation
description: 'Images, video, audio and 3D models - `type` selects the pipeline and `input.model` selects the priced model (see GET /partner/v1/models). The Idempotency-Key header (1-200 chars) is REQUIRED and replayable for 24 hours: a retry with the same key returns the original generation instead of dispatching (and billing) again; after 24h the key is purged and reusable. Returns 202 with the generation id - poll GET /partner/v1/generations/{id} for status and assets. Structured D&D entity types moved to POST /partner/v1/entities (an entity type here is a 400).'
operationId: create
parameters:
- name: Idempotency-Key
in: header
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
discriminator:
propertyName: type
mapping:
image: '#/components/schemas/ImageGenerationRequest'
video: '#/components/schemas/VideoGenerationRequest'
audio: '#/components/schemas/AudioGenerationRequest'
model3d: '#/components/schemas/Model3dGenerationRequest'
oneOf:
- $ref: '#/components/schemas/ImageGenerationRequest'
- $ref: '#/components/schemas/VideoGenerationRequest'
- $ref: '#/components/schemas/AudioGenerationRequest'
- $ref: '#/components/schemas/Model3dGenerationRequest'
examples:
Image:
description: Per-model price; see GET /models.
value:
type: image
input:
model: Flux.Dev
prompt: a gruff dwarven blacksmith portrait
size: 1024x1024
numImages: 1
Video:
description: 'Video Duration in seconds - must be one of the model''s capabilities.videoDurations (Sora 2: 8|12|16|20); some models require a referenceImageUrl - check the catalog flag.'
value:
type: video
input:
model: Sora 2
prompt: a dragon banking over a stormy sea
requestFields:
Video Duration: '8'
Audio:
description: Duration in seconds for duration-priced models (e.g. ElevenLabs Music).
value:
type: audio
input:
model: ElevenLabs Music
prompt: a rousing tavern ballad
requestFields:
Duration: '30'
3D model:
description: 3D model
value:
type: model3d
input:
model: Meshy6
prompt: an ornate dwarven warhammer
required: true
responses:
'200':
description: OK
content:
'*/*':
schema:
type: object
'400':
description: Bad Request
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'401':
description: Unauthorized
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'402':
description: Payment Required
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'404':
description: Not Found
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'409':
description: Conflict
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'422':
description: Unprocessable Entity
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
/partner/v1/generations/{id}:
get:
tags:
- Generations
summary: Poll a generation
description: Status, assets and (for entity types) the structured `result` JSON of ANY generation - render or entity, whichever endpoint dispatched it.
operationId: get
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
responses:
'200':
description: OK
content:
'*/*':
schema:
type: object
'400':
description: Bad Request
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'401':
description: Unauthorized
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'402':
description: Payment Required
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'404':
description: Not Found
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'409':
description: Conflict
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
'422':
description: Unprocessable Entity
content:
'*/*':
schema:
type: object
additionalProperties:
type: string
components:
schemas:
Model3dInput:
type: object
properties:
model:
type: string
description: Exact model name from GET /partner/v1/models (type=model3d).
example: Meshy6
prompt:
type: string
description: The generation prompt.
example: an ornate dwarven warhammer
referenceImageUrl:
type: string
description: Publicly fetchable image URL for image-to-3D generation. Not accepted by the 3D tools.
sourceModelUrl:
type: string
description: '3D tools only (capabilities.requiresSourceModel): the model to work on, an https link to a GLB, glTF, FBX, OBJ or STL file. Tripo Smart Segment takes GLB only. Refused by the other 3D models.'
example: https://cdn.example.com/hero.glb
required:
- model
VideoGenerationRequest:
type: object
description: Generate a video clip.
properties:
type:
type: string
enum:
- video
example: video
input:
$ref: '#/components/schemas/VideoInput'
AudioGenerationRequest:
type: object
description: Generate music, sound effects or speech.
properties:
type:
type: string
enum:
- audio
example: audio
input:
$ref: '#/components/schemas/AudioInput'
AudioInput:
type: object
properties:
model:
type: string
description: Exact model name from GET /partner/v1/models (type=audio).
example: ElevenLabs Music
prompt:
type: string
description: The generation prompt. For TTS models this is the text to speak (per-character pricing - see the catalog pricingNote).
example: a rousing tavern ballad
referenceVideoUrl:
type: string
description: Publicly fetchable video URL - reference for video-to-audio models (e.g. MMAudio V2).
requestFields:
type: object
additionalProperties:
type: string
description: 'Extra options. Allowed keys: `Duration` (seconds, 1-600; duration-billed models narrow this - see capabilities.durationRangeSeconds; scales the price for duration-billed models). Other keys in the global allowlist (`Quality`, `Premium Quality`, `Aspect Ratio`, `Resolution`, `Video Duration`, `Generate Audio`) are accepted by the runtime but have no effect for audio. Non-allowlisted keys are dropped.'
required:
- model
VideoInput:
type: object
properties:
model:
type: string
description: Exact model name from GET /partner/v1/models (type=video).
example: Sora 2
prompt:
type: string
description: The generation prompt.
example: a dragon banking over a stormy sea
referenceImageUrl:
type: string
description: Publicly fetchable image URL. REQUIRED for image-to-video models flagged requiresReferenceImage in the catalog.
referenceVideoUrl:
type: string
description: Publicly fetchable .mp4 or .webm source video, at least 2 seconds. REQUIRED for, and read only by, the video-edit models OpenJutsu Character Swap and OpenJutsu Object Swap (priced per second of this clip - see the catalog pricingNote).
requestFields:
type: object
additionalProperties:
type: string
description: 'Extra options. Allowed keys: `Video Duration` (seconds; must be one of the model''s capabilities.videoDurations from the catalog; REQUIRED when capabilities.requiresVideoDuration is true - Kling 2.6 Pro, Kling O1, Kling O1 Standard, Grok Imagine Video; scales the price for duration-billed models), `Generate Audio` (true|false - models flagged capabilities.supportsGenerateAudio, may multiply the price), `Resolution` (see capabilities.resolutions), `Aspect Ratio`, `Generate Multi Clip` (true|false - PixVerse V6 Max only, one clip that cuts between several shots, no extra charge), `Swap Target` and `Swap Mode` (Change|Background - OpenJutsu Object Swap), `Character Role 1` to `Character Role 4` (OpenJutsu Character Swap). Other keys in the global allowlist (`Quality`, `Premium Quality`, `Duration`) are accepted by the runtime but have no effect for video. Non-allowlisted keys are dropped.'
required:
- model
ImageInput:
type: object
properties:
model:
type: string
description: Exact model name from GET /partner/v1/models (type=image).
example: Flux.Dev
prompt:
type: string
description: The generation prompt.
example: a gruff dwarven blacksmith portrait
referenceImageUrl:
type: string
description: Publicly fetchable image URL. REQUIRED for models flagged requiresReferenceImage in the catalog; optional image-to-image guidance for the rest.
size:
type: string
description: '`<width>x<height>`. Each side must be within the model''s capabilities.minSizePx-maxSizePx from the catalog (most models 256-1536). Default 1024x1024 - models whose minimum exceeds 1024 require an explicit size.'
example: 1024x1024
numImages:
type: integer
format: int32
description: 1-10. Default 1.
example: 1
requestFields:
type: object
additionalProperties:
type: string
description: 'Extra options. Allowed keys: `Quality`, `Premium Quality` (Low|Medium|High - prices the GPT Image and Ideogram families), `Aspect Ratio`. Other keys in the global allowlist (`Duration`, `Video Duration`, `Generate Audio`, `Resolution`) are accepted by the runtime but have no effect for image. Non-allowlisted keys are dropped.'
required:
- model
Model3dGenerationRequest:
type: object
description: Generate a 3D model.
properties:
type:
type: string
enum:
- model3d
example: model3d
input:
$ref: '#/components/schemas/Model3dInput'
ImageGenerationRequest:
type: object
description: Generate one or more images.
properties:
type:
type: string
enum:
- image
example: image
input:
$ref: '#/components/schemas/ImageInput'