Skip to content

Dispatch a model-generator workflow

POST
/v1/model-generator
curl --request POST \
--url https://example.com/v1/model-generator \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "image_model": "example", "eval_enabled": true, "resolution": "example", "aspect_ratio": "example", "seed": 1, "on_technical_failure": "example", "display_name": "", "gender": "MALE", "ethnicity": "example", "body_type": "example", "age_range": "example", "metadata": {}, "pilot_brand": "example" }'
X-Shopify-Hmac-Sha256
Any of:
string
Media type application/json
ModelGeneratorRequest

POST /v1/model-generator — a catalog-model spec.

object
image_model
Any of:
string
eval_enabled
Any of:
boolean
resolution
Any of:
string
aspect_ratio
Any of:
string
seed
Any of:
integer
on_technical_failure
Any of:
string
display_name
Display Name

Human-readable name for the catalog entry. Optional — when omitted, studio coins an evocative catalog name during generation.

string
""
gender
required
UserCategory

User gender. Matches studio.schema.common.UserCategory.

string
Allowed values: MALE FEMALE
ethnicity
required
Ethnicity
string
body_type
required
Body Type
string
age_range
required
Age Range
string
metadata
Metadata
object
key
additional properties
any
pilot_brand
Any of:
string

Successful Response

Media type application/json
WorkflowAcceptedResponse

Returned synchronously from any POST /v1/{name} (202).

object
request_id
required
Request Id

26-char ULID — correlates with the row in request_logs.

string
job_id
required
Any of:
string
status
JobStatus

Studio’s job status at submit time. Almost always NOT_STARTED in this 202.

string
default: NOT_STARTED
Allowed values: NOT_STARTED IN_PROGRESS SUCCESS FAILURE
credits_cost
required
Credits Cost

Credits deducted from the calling client. Refunded automatically on any failure path.

integer
Example
{
"status": "NOT_STARTED"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}