Skip to content
Endless Documentation
Generations

Create generation

POST
/generations

Creates a generation and returns the created row.

Authorization

headerAuthorizationBearer <esk_live_…>

A workspace API key created in workspace settings. It acts as the member who created it, narrowed to its abilities, projects and credit limit. Each operation names the ability it needs.

Scope: generations:create

Header Parameters

Endless-Api-Version?string

Pin the caller to an API major (1). Omit to accept the current version. A major this deployment cannot serve is refused with 400 unsupported_api_version.

Request Body

application/json
  1. body
organization_id*string
Match^org_
output_type*string
Value in"image""video""audio""3d"
model_id?string|null
fallback_model_id?string|null
strict_model?boolean
version_id?|null
quick_action_id?|null
parameters?
Default{}
project_id?|null
id?string
Formatuuid
canvas_id?|null
canvas_position?|null
canvas_size?|null
page_id?string|null
conversation_id?|null
message_id?|null
tool_call_id?|null
source_generation_id?|null
written_prompt?|null
elements?array<>
Itemsitems <= 20
max_credits?number
Range0 <= value
dispatch?string
Default"auto"
Value in"auto""inline"

Response Body

OK

application/json
  1. response
generation_id*string
reused*boolean
status*string
Value in"running""completed""failed"
model*
quote*
credits_charged*number
assets*array<>
Example Request
curl -X POST 'https://api.endless.app/generations' \  -H 'Content-Type: application/json' \  -d '{  "organization_id": "string",  "output_type": "image"}'
Example Response
{  "generation_id": "string",  "reused": true,  "status": "running",  "model": {    "id": "string",    "name": "string"  },  "quote": {    "per_output": 0,    "count": 1,    "total": 0,    "is_minimum": true  },  "credits_charged": 0,  "assets": [    {      "asset_id": "string",      "url": "string",      "type": "string"    }  ]}