Images
Generate or upload an image
Two modes — discriminated by the request Content-Type:
- AI generation (
application/json) — kicks off async generation inheriting the project’s brand context. Returns aJobwithtype: image.generate. On completion,resultcontains{ url, key, width, height }. Costs 32 credits (image). - Direct upload (
multipart/form-data) — synchronous swap with the uploaded file bytes.fileandkeyare required. Returns the registeredImageimmediately. Costs 1 credit (image_register). Max 10MB; jpg/jpeg/png/webp/gif/svg only.
POST
Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Body
Example:
"A serene yoga studio at dawn, soft sage and linen tones, no people"
Example:
"photorealistic"
Available options:
1:1, 16:9, 9:16, 4:5, 4:3, 3:2 Optional. If provided, the image is also addressable by this key.
Example:
"hero.background"
Response
Image uploaded (multipart mode).