Send multipart/form-data with a prompt and, optionally, reference images. The request is asynchronous: it answers immediately with a queuedImage object whose ID starts with img_, and you poll Get Image until status is ready or failed. Without reference images this is text-to-image; with at least one, the model is guided by them.
Pricing (1 credit = $0.01): 1 credit ($0.01) per image at 1K, 2 credits ($0.02) per image at 2K. A job costs n × the per-image price — for example, 2K with n=3 is 6 credits. The whole amount is reserved when the job is created and refunded in full if it fails. aspect_ratio, seed, and reference images don’t affect price. See Pricing and retention.
Request parameters
Send multipart/form-data.
Parameter
Type
Required
Default
Description
prompt
string
Yes
—
Text description of the images. Up to 4000 characters, counted as Unicode code points (one CJK character counts as one). Must not be blank.
aspect_ratio
string
No
1:1
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, or 2:3. Together with resolution, selects the exact output size — see Output sizes.
resolution
string
No
1K
1K or 2K, case-insensitive. Sets the output size tier and the per-image price: 1 credit at 1K, 2 credits at 2K.
n
integer
No
1
Number of images to generate, 1–6.
seed
integer
No
random
0–2147483647. Image i (counting from 0) uses (seed + i) mod 2147483648. Omitted, the server picks a random seed. Every image reports the seed it actually used.
reference_image
file, repeatable
No
—
Reference image upload, up to 24 MiB each. Repeat the field to send more than one.
reference_image_url
string, repeatable
No
—
Publicly reachable http(s) image URL, under the same limits as reference_image. Repeat the field to send more than one.
Up to 8 reference images in total, as any mix of reference_image and reference_image_url. The model receives the uploaded files first, then the URLs, each in the order you sent them. Supplying any reference image moves 2K to a smaller size — see the next section.
Reference image limits
Up to 24 MiB each, with a long-to-short side ratio of at most 8.
JPEG, PNG, WebP, GIF, BMP, TIFF, or HEIC.
An image with a long side of 3840 px or more, or a short side of 2160 px or more, is first downscaled, keeping its aspect ratio, to fit within 1920 × 1080 (1080 × 1920 for a portrait image).
A reference_image_url must be publicly reachable; it is downloaded while the create request is being processed.
Output sizes
aspect_ratio and resolution together select one of the model’s fixed sizes — you get exactly the size listed. Width × height, in pixels:
aspect_ratio
1K
2K (text only)
2K (with reference images)
1:1
1024 × 1024
2048 × 2048
1536 × 1536
16:9
1376 × 768
2720 × 1536
2048 × 1152
9:16
768 × 1376
1536 × 2720
1152 × 2048
4:3
1184 × 896
2368 × 1760
1760 × 1344
3:4
896 × 1184
1760 × 2368
1344 × 1760
3:2
1248 × 832
2496 × 1664
1888 × 1248
2:3
832 × 1248
1664 × 2496
1248 × 1888
1K is the same with or without reference images. 2K is about 2048² pixels of area for text-to-image and about 1536² with reference images; the price is the same either way. Each image’s width and height in the response are its actual size.
Response parameters
Returns 200 OK with an Image object in queued state — the same shape Get Image returns. progress is 0, images is empty, and completed_at and error are null.
A parameter is invalid — message names which one — or the body isn’t multipart/form-data. No job is created and no file is uploaded.
401 UNAUTHENTICATED
Missing or invalid API key.
402 INSUFFICIENT_CREDITS
The balance can’t cover n × the per-image price; message gives the credits required. No generation starts.
429 RATE_LIMITED
Too many concurrent create requests on the same key. Retry later.
500 INTERNAL_ERROR
Internal server error. Retryable.
503 SERVICE_BUSY
Service temporarily unavailable. Retryable.
HTTP errors use the standard envelope — {"error": {"code", "message", "retryable", "request_id", "details", "remediation"}}. See Errors and recovery. A job that is accepted and later fails reports its failure in the Image object’s error field instead — see Get Image.
Send your own User-Agent header. Python urllib’s default User-Agent has been observed to be blocked in front of apis.viggle.ai, which answers with a non-JSON error page instead of an API error.The body must be multipart/form-data, even without reference images — an application/x-www-form-urlencoded body gets 400. With Python requests, pass the fields through files= (as below), not data= alone.
Examples
curl -X POST https://apis.viggle.ai/v1/images \ -H "Authorization: Bearer $VIGGLE_API_KEY" \ -F prompt="A watercolor fox reading a book under a maple tree" \ -F aspect_ratio=16:9 \ -F resolution=1K \ -F n=2
import os, requestsfields = {"prompt": "A watercolor fox reading a book under a maple tree", "aspect_ratio": "16:9", "resolution": "1K", "n": "2"}response = requests.post( "https://apis.viggle.ai/v1/images", headers={"Authorization": f"Bearer {os.environ['VIGGLE_API_KEY']}"}, files={name: (None, value) for name, value in fields.items()}, # forces multipart/form-data)response.raise_for_status()image = response.json()
const form = new FormData();form.append("prompt", "A watercolor fox reading a book under a maple tree");form.append("aspect_ratio", "16:9");form.append("resolution", "1K");form.append("n", "2");const response = await fetch("https://apis.viggle.ai/v1/images", { method: "POST", headers: { Authorization: `Bearer ${process.env.VIGGLE_API_KEY}` }, body: form,});const image = await response.json();
body := &bytes.Buffer{}; w := multipart.NewWriter(body)w.WriteField("prompt", "A watercolor fox reading a book under a maple tree"); w.WriteField("aspect_ratio", "16:9"); w.WriteField("resolution", "1K"); w.WriteField("n", "2"); w.Close()req, _ := http.NewRequest("POST", "https://apis.viggle.ai/v1/images", body)req.Header.Set("Authorization", "Bearer "+os.Getenv("VIGGLE_API_KEY")); req.Header.Set("Content-Type", w.FormDataContentType())resp, err := http.DefaultClient.Do(req); if err != nil { panic(err) }; defer resp.Body.Close()
With reference images
Uploads and URLs can be mixed, and both fields can be repeated:
curl -X POST https://apis.viggle.ai/v1/images \ -H "Authorization: Bearer $VIGGLE_API_KEY" \ -F prompt="The same fox, now in winter, snow falling" \ -F aspect_ratio=1:1 \ -F resolution=2K \ -F[email protected] \ -F reference_image_url=https://example.com/style.jpg
import os, requestswith open("fox.png", "rb") as fox: response = requests.post( "https://apis.viggle.ai/v1/images", headers={"Authorization": f"Bearer {os.environ['VIGGLE_API_KEY']}"}, data={ "prompt": "The same fox, now in winter, snow falling", "aspect_ratio": "1:1", "resolution": "2K", "reference_image_url": ["https://example.com/style.jpg"], }, files=[("reference_image", ("fox.png", fox, "image/png"))], )response.raise_for_status()image = response.json()
import { openAsBlob } from "node:fs";const form = new FormData();form.append("prompt", "The same fox, now in winter, snow falling");form.append("aspect_ratio", "1:1");form.append("resolution", "2K");form.append("reference_image", await openAsBlob("fox.png"), "fox.png");form.append("reference_image_url", "https://example.com/style.jpg");const response = await fetch("https://apis.viggle.ai/v1/images", { method: "POST", headers: { Authorization: `Bearer ${process.env.VIGGLE_API_KEY}` }, body: form,});const image = await response.json();
@viggle/sdk
Requires an @viggle/sdk version that includes the images resource.
import { Viggle } from "@viggle/sdk";const viggle = new Viggle({ apiKey: process.env.VIGGLE_API_KEY! });const image = await viggle.images.create({ prompt: "A watercolor fox reading a book under a maple tree", aspectRatio: "16:9", resolution: "1K", n: 2,});// image.id, image.status ("queued"); poll with viggle.images.get(image.id)
Next step
Use Get Image with the returned id to poll for the result.
Quick Start: Viggle Image
Follow the complete create, poll, and download flow.
Get Image
Read the job’s status, image URLs, sizes, and seeds.
Authorizations
Authorization
string
header
required
Server-side SDK clients use a project API key. Remote MCP clients use
an OAuth access token. Never expose a project API key in browser code.
Headers
X-Request-Id
string
Optional caller-supplied correlation ID, up to 128 characters. The service returns the effective value in the response header for tracing and support.
Required string length: 1 - 128
X-Viggle-Source
string
Optional source-channel label, up to 128 characters, used to attribute traffic to an SDK, integration, product surface, or internal workflow.
Required string length: 1 - 128
Body
multipart/form-data
Body of POST /v1/images, multipart/form-data only. Text-to-image
when no reference image is supplied, reference-guided generation when
at least one is. aspect_ratio and resolution select one of the
model's fixed output sizes (width × height, in pixels); with
reference images, 2K is a smaller size than without:
aspect_ratio
1K
2K
2K with reference images
1:1
1024×1024
2048×2048
1536×1536
16:9
1376×768
2720×1536
2048×1152
9:16
768×1376
1536×2720
1152×2048
4:3
1184×896
2368×1760
1760×1344
3:4
896×1184
1760×2368
1344×1760
3:2
1248×832
2496×1664
1888×1248
2:3
832×1248
1664×2496
1248×1888
Up to 8 reference images in total, as any mix of reference_image
uploads and reference_image_url URLs. The model receives the
uploads first, then the URLs, each in the order sent.
prompt
string
required
Text description of the images. Up to 4000 characters, counted as Unicode code points (one CJK character counts as one). Must not be blank.
Required string length: 1 - 4000
aspect_ratio
enum<string>
default:1:1
Output aspect ratio. Together with resolution, it selects the exact output size.
Available options:
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3
resolution
enum<string>
default:1K
Output size tier, case-insensitive, and the price of each image — 1 credit at 1K, 2 credits at 2K. With any reference image, 2K is about 1536² pixels instead of about 2048².
Available options:
1K,
2K
n
integer
default:1
Number of images to generate. The job reserves n × the per-image price.
Required range: 1 <= x <= 6
seed
integer<int64>
Image i (counting from 0) is generated with seed
(seed + i) mod 2147483648. Omitted, the server picks a random
seed; each image reports the seed it used.
Required range: 0 <= x <= 2147483647
reference_image
file[]
Reference image upload; repeat the field for more than one. Each up to 24 MiB, with a long-to-short side ratio of at most 8; JPEG, PNG, WebP, GIF, BMP, TIFF, or HEIC. Counts toward the 8-image total shared with reference_image_url.
Maximum array length: 8
reference_image_url
string<uri>[]
Publicly reachable http(s) reference image URL, downloaded while the create request is processed; repeat the field for more than one. Same limits as reference_image, and counts toward the same 8-image total.
Maximum array length: 8
Response
Image generation accepted and queued.
An image generation job (img_ prefix), returned by both
POST /v1/images and GET /v1/images/{image_id}. It only moves
forward — queued → processing → ready or failed — and is
never cancelled. images stays empty until the job is ready,
then lists every generated image in request order. A job either
produces all n images or fails; it never returns a partial set.
id
string
required
Public image job ID, img_ prefix.
Minimum string length: 1
status
enum<string>
required
Lifecycle state. ready and failed are terminal.
Available options:
queued,
processing,
ready,
failed
progress
integer | null
required
Share of the requested images generated so far — 0 while queued, 0–99 while processing, 100 when ready, null when failed.
Required range: 0 <= x <= 100
images
object[]
required
Empty until ready, then all n generated images in request order.
Show child attributes
created_at
string<date-time> | null
required
Creation timestamp, RFC 3339.
completed_at
string<date-time> | null
required
Terminal-state timestamp; set once the job is ready or failed, null before that.
error
object | null
required
Failure details, only when status is failed; otherwise null.
code is SERVICE_BUSY (retryable — the generation service is
busy or unavailable, or the job did not finish within 15
minutes), TASK_FAILED (retryable — any other generation or
upload failure), or INVALID_REQUEST (not retryable — the model
rejected the request, for example an unusable reference image).
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Viggle API","colors":{"primary":"#006B24","light":"#00FF41","dark":"#00FF41"},"logo":{"light":"https://mintcdn.com/warpenginecanadainc/oTXNibAtWbuw3JwC/logo/viggle-logo.png?fit=max\u0026auto=format\u0026n=oTXNibAtWbuw3JwC\u0026q=85\u0026s=2f347195e8ecb0ee0b937a6ab0bb9d42","dark":"https://mintcdn.com/warpenginecanadainc/oTXNibAtWbuw3JwC/logo/viggle-logo-dark.png?fit=max\u0026auto=format\u0026n=oTXNibAtWbuw3JwC\u0026q=85\u0026s=7e13f84df522a89ad33c11366a6c0ea9"},"favicon":"https://mintcdn.com/warpenginecanadainc/pFK0TLhWlVhXAQsU/favicon.ico?fit=max\u0026auto=format\u0026n=pFK0TLhWlVhXAQsU\u0026q=85\u0026s=bb4a6224df371e17c4f410171e831068","api":{"openapi":"openapi.yaml","mdx":{"auth":{"method":"bearer"},"server":"https://apis.viggle.ai"}},"background":{"color":{"light":"#eeeee8","dark":"#0e0e10"}},"navbar":{"links":[{"href":"https://portal.viggle.ai/dashboard","label":"Dashboard"}],"primary":{"type":"button","label":"Get API Key","href":"https://portal.viggle.ai/keys"}},"footer":{"socials":{"twitter":"https://twitter.com/ViggleAI","discord":"https://discord.com/invite/viggle","instagram":"https://www.instagram.com/viggle_ai","youtube":"https://www.youtube.com/@ViggleAI","linkedin":"https://www.linkedin.com/company/viggle"}},"seo":{"indexing":"navigable"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"v1/guides/quickstart-reference-to-video"},{"language":"zh","navbar":{"links":[{"href":"https://portal.viggle.ai/dashboard","label":"控制台"}],"primary":{"type":"button","label":"获取 API 密钥","href":"https://portal.viggle.ai/keys"}},"href":"zh/v1/guides/quickstart-reference-to-video"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"warpenginecanadainc","hasAudioNarration":false,"actualSubdomain":"warpenginecanadainc","customDomains":["docs.viggle.ai"],"gitSource":{"type":"github","owner":"warpengine-github","repo":"viggle-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6afd50850647be7d29002dce","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"en","tag":"API Reference","count":33},{"language":"zh","tag":"API 参考","count":33},{"language":"en","tag":"Documentation","count":21},{"language":"zh","tag":"文档","count":21},{"language":"en","tag":"Get Started","count":16},{"language":"zh","tag":"快速入门","count":16},{"language":"en","tag":"Videos","count":8},{"language":"zh","tag":"视频","count":8},{"language":"en","tag":"Motions","count":7},{"language":"zh","tag":"动作","count":7},{"language":"en","tag":"Characters","count":5},{"language":"en","tag":"Scene Model","count":5},{"language":"zh","tag":"角色","count":5},{"language":"zh","tag":"场景模型","count":5},{"language":"en","tag":"Renders","count":4},{"language":"zh","tag":"渲染","count":4},{"language":"en","tag":"Production","count":3},{"language":"zh","tag":"生产接入","count":3},{"language":"en","tag":"Account","count":2},{"language":"zh","tag":"账户","count":2},{"language":"default","tag":"Documentation","count":1},{"language":"default","tag":"Guides","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"global.css","content":":root{--sidebar-heading-color: rgba(0, 0, 0, 0.62);--sidebar-border-subtle: rgba(0, 0, 0, 0.1)}.dark,[data-theme=\"dark\"]{--sidebar-heading-color: rgba(255, 255, 255, 0.45);--sidebar-border-subtle: rgba(255, 255, 255, 0.08)}*,*::before,*::after{border-radius:2px!important}#content-area svg,#content-area [style*=\"mask-image\"]{border-radius:0!important}#content-area .code-group,#content-area .code-group *,#content-area [data-component-part=\"code-block-root\"]{border-radius:2px!important}#content-area .border-standard[class*=\"rounded-2xl\"]{border:none!important;background:transparent!important;padding:0!important}#content-area{min-width:0;position:relative}#content-container{min-width:0}#sidebar-content li{margin-bottom:1px}#sidebar-content [class*=\"sidebar-group-icon\"],#sidebar-content .sidebar-group-icon,#navigation-items a>div[class*=\"shrink-0\"],#navigation-items a>div:first-child:not([class*=\"flex-1\"]),#navigation-items a svg,#navigation-items a img{display:none!important}#sidebar-content a[href*=\"api-reference/\"]::after,#mobile-nav a[href*=\"api-reference/\"]::after{font-size:0.6rem;font-weight:700;letter-spacing:0.02em;padding:1px 5px;margin-left:auto;align-self:center;flex-shrink:0;line-height:1.4}#sidebar-content a[href*=\"characters/create\"]::after,#sidebar-content a[href*=\"scenes/create\"]::after,#sidebar-content a[href*=\"scenes/import\"]::after,#sidebar-content a[href*=\"render/create\"]::after,#sidebar-content a[href*=\"render/multi-character\"]::after,#mobile-nav a[href*=\"characters/create\"]::after,#mobile-nav a[href*=\"scenes/create\"]::after,#mobile-nav a[href*=\"scenes/import\"]::after,#mobile-nav a[href*=\"render/create\"]::after,#mobile-nav a[href*=\"render/multi-character\"]::after{content:\"POST\";background:rgba(96, 165, 250, 0.15);color:rgb(96, 165, 250)}.dark #sidebar-content a[href*=\"characters/create\"]::after,.dark #sidebar-content a[href*=\"scenes/create\"]::after,.dark #sidebar-content a[href*=\"scenes/import\"]::after,.dark #sidebar-content a[href*=\"render/create\"]::after,.dark #sidebar-content a[href*=\"render/multi-character\"]::after,.dark #mobile-nav a[href*=\"characters/create\"]::after,.dark #mobile-nav a[href*=\"scenes/create\"]::after,.dark #mobile-nav a[href*=\"scenes/import\"]::after,.dark #mobile-nav a[href*=\"render/create\"]::after,.dark #mobile-nav a[href*=\"render/multi-character\"]::after{background:rgba(96, 165, 250, 0.2);color:rgb(147, 197, 253)}#sidebar-content a[href*=\"characters/list\"]::after,#sidebar-content a[href*=\"characters/get\"]::after,#sidebar-content a[href*=\"scenes/list\"]::after,#sidebar-content a[href*=\"scenes/get\"]::after,#sidebar-content a[href*=\"render/poll\"]::after,#sidebar-content a[href*=\"render/status\"]::after,#sidebar-content a[href*=\"render/download\"]::after,#sidebar-content a[href*=\"credits/balance\"]::after,#mobile-nav a[href*=\"characters/list\"]::after,#mobile-nav a[href*=\"characters/get\"]::after,#mobile-nav a[href*=\"scenes/list\"]::after,#mobile-nav a[href*=\"scenes/get\"]::after,#mobile-nav a[href*=\"render/poll\"]::after,#mobile-nav a[href*=\"render/status\"]::after,#mobile-nav a[href*=\"render/download\"]::after,#mobile-nav a[href*=\"credits/balance\"]::after{content:\"GET\";background:rgba(74, 222, 128, 0.15);color:rgb(21, 128, 61)}.dark #sidebar-content a[href*=\"characters/list\"]::after,.dark #sidebar-content a[href*=\"characters/get\"]::after,.dark #sidebar-content a[href*=\"scenes/list\"]::after,.dark #sidebar-content a[href*=\"scenes/get\"]::after,.dark #sidebar-content a[href*=\"render/poll\"]::after,.dark #sidebar-content a[href*=\"render/status\"]::after,.dark #sidebar-content a[href*=\"render/download\"]::after,.dark #sidebar-content a[href*=\"credits/balance\"]::after,.dark #mobile-nav a[href*=\"characters/list\"]::after,.dark #mobile-nav a[href*=\"characters/get\"]::after,.dark #mobile-nav a[href*=\"scenes/list\"]::after,.dark #mobile-nav a[href*=\"scenes/get\"]::after,.dark #mobile-nav a[href*=\"render/poll\"]::after,.dark #mobile-nav a[href*=\"render/status\"]::after,.dark #mobile-nav a[href*=\"render/download\"]::after,.dark #mobile-nav a[href*=\"credits/balance\"]::after{background:rgba(74, 222, 128, 0.2);color:rgb(74, 222, 128)}#sidebar-content a[href*=\"characters/delete\"]::after,#sidebar-content a[href*=\"scenes/delete\"]::after,#mobile-nav a[href*=\"characters/delete\"]::after,#mobile-nav a[href*=\"scenes/delete\"]::after{content:\"DEL\";background:rgba(248, 113, 113, 0.15);color:rgb(185, 28, 28)}.dark #sidebar-content a[href*=\"characters/delete\"]::after,.dark #sidebar-content a[href*=\"scenes/delete\"]::after,.dark #mobile-nav a[href*=\"characters/delete\"]::after,.dark #mobile-nav a[href*=\"scenes/delete\"]::after{background:rgba(248, 113, 113, 0.2);color:rgb(248, 113, 113)}#sidebar-content a[href*=\"v1/api-reference/characters/create\"]::after,#sidebar-content a[href*=\"v1/api-reference/motions/create\"]::after,#sidebar-content a[href*=\"v1/api-reference/motions/import\"]::after,#sidebar-content a[href*=\"v1/api-reference/videos/create\"]::after,#sidebar-content a[href*=\"v1/api-reference/videos/super-resolution\"]::after,#sidebar-content a[href*=\"v1/api-reference/images/create\"]::after,#sidebar-content a[href*=\"v1/api-reference/scenes/pano\"]::after,#sidebar-content a[href*=\"v1/api-reference/scenes/custom-pano\"]::after,#sidebar-content a[href*=\"v1/api-reference/scenes/generate\"]::after,#sidebar-content a[href*=\"v1/api-reference/scenes/reconstruct\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/prepare\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/create\"]::after,#sidebar-content a[href*=\"v1/api-reference/conversion/create-avatar\"]::after,#sidebar-content a[href*=\"v1/api-reference/conversion/create-animation\"]::after,#mobile-nav a[href*=\"v1/api-reference/characters/create\"]::after,#mobile-nav a[href*=\"v1/api-reference/motions/create\"]::after,#mobile-nav a[href*=\"v1/api-reference/motions/import\"]::after,#mobile-nav a[href*=\"v1/api-reference/videos/create\"]::after,#mobile-nav a[href*=\"v1/api-reference/videos/super-resolution\"]::after,#mobile-nav a[href*=\"v1/api-reference/images/create\"]::after,#mobile-nav a[href*=\"v1/api-reference/scenes/pano\"]::after,#mobile-nav a[href*=\"v1/api-reference/scenes/custom-pano\"]::after,#mobile-nav a[href*=\"v1/api-reference/scenes/generate\"]::after,#mobile-nav a[href*=\"v1/api-reference/scenes/reconstruct\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/prepare\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/create\"]::after,#mobile-nav a[href*=\"v1/api-reference/conversion/create-avatar\"]::after,#mobile-nav a[href*=\"v1/api-reference/conversion/create-animation\"]::after{content:\"POST\";background:rgba(96, 165, 250, 0.2);color:rgb(147, 197, 253)}#sidebar-content a[href*=\"v1/api-reference/credits\"]::after,#sidebar-content a[href*=\"v1/api-reference/characters/list\"]::after,#sidebar-content a[href*=\"v1/api-reference/characters/get\"]::after,#sidebar-content a[href*=\"v1/api-reference/characters/export\"]::after,#sidebar-content a[href*=\"v1/api-reference/motions/list\"]::after,#sidebar-content a[href*=\"v1/api-reference/motions/get\"]::after,#sidebar-content a[href*=\"v1/api-reference/motions/export\"]::after,#sidebar-content a[href*=\"v1/api-reference/videos/list\"]::after,#sidebar-content a[href*=\"v1/api-reference/videos/get\"]::after,#sidebar-content a[href*=\"v1/api-reference/images/get\"]::after,#sidebar-content a[href*=\"v1/api-reference/scenes/get\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/list\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/get\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/events\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/download\"]::after,#sidebar-content a[href*=\"v1/api-reference/conversion/get-avatar\"]::after,#sidebar-content a[href*=\"v1/api-reference/conversion/get-animation\"]::after,#mobile-nav a[href*=\"v1/api-reference/credits\"]::after,#mobile-nav a[href*=\"v1/api-reference/characters/list\"]::after,#mobile-nav a[href*=\"v1/api-reference/characters/get\"]::after,#mobile-nav a[href*=\"v1/api-reference/characters/export\"]::after,#mobile-nav a[href*=\"v1/api-reference/motions/list\"]::after,#mobile-nav a[href*=\"v1/api-reference/motions/get\"]::after,#mobile-nav a[href*=\"v1/api-reference/motions/export\"]::after,#mobile-nav a[href*=\"v1/api-reference/videos/list\"]::after,#mobile-nav a[href*=\"v1/api-reference/videos/get\"]::after,#mobile-nav a[href*=\"v1/api-reference/images/get\"]::after,#mobile-nav a[href*=\"v1/api-reference/scenes/get\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/list\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/get\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/events\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/download\"]::after,#mobile-nav a[href*=\"v1/api-reference/conversion/get-avatar\"]::after,#mobile-nav a[href*=\"v1/api-reference/conversion/get-animation\"]::after{content:\"GET\";background:rgba(74, 222, 128, 0.2);color:rgb(74, 222, 128)}#sidebar-content a[href*=\"v1/api-reference/characters/delete\"]::after,#sidebar-content a[href*=\"v1/api-reference/motions/delete\"]::after,#sidebar-content a[href*=\"v1/api-reference/renders/cancel\"]::after,#mobile-nav a[href*=\"v1/api-reference/characters/delete\"]::after,#mobile-nav a[href*=\"v1/api-reference/motions/delete\"]::after,#mobile-nav a[href*=\"v1/api-reference/renders/cancel\"]::after{content:\"DEL\";background:rgba(248, 113, 113, 0.2);color:rgb(248, 113, 113)}#content-area .tryit-button{background:transparent!important}#content-area .tryit-button [data-component-part=\"icon-svg\"],#content-area .tryit-button svg[style*=\"mask-image\"]{background-color:currentColor!important}#content-area :has(.method-pill[class*=\"text-blue\"])>.tryit-button{color:rgb(29, 78, 216)!important;border:1px solid rgb(29, 78, 216)!important}.dark #content-area :has(.method-pill[class*=\"text-blue\"])>.tryit-button{color:rgb(96, 165, 250)!important;border:1px solid rgb(96, 165, 250)!important}#content-area :has(.method-pill[class*=\"text-green\"])>.tryit-button{color:rgb(21, 128, 61)!important;border:1px solid rgb(21, 128, 61)!important}.dark #content-area :has(.method-pill[class*=\"text-green\"])>.tryit-button{color:rgb(74, 222, 128)!important;border:1px solid rgb(74, 222, 128)!important}#content-area :has(.method-pill[class*=\"text-red\"])>.tryit-button{color:rgb(185, 28, 28)!important;border:1px solid rgb(185, 28, 28)!important}.dark #content-area :has(.method-pill[class*=\"text-red\"])>.tryit-button{color:rgb(248, 113, 113)!important;border:1px solid rgb(248, 113, 113)!important}#navigation-items a[href*=\"discord\"]{width:fit-content;padding:6px 12px;border:1px solid var(--sidebar-border-subtle);background:color-mix(in srgb, var(--primary) 4%, transparent);transition:background 0.15s cubic-bezier(0.16, 1, 0.3, 1),\n border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1)}#navigation-items a[href*=\"discord\"]:hover{border-color:color-mix(in srgb, var(--primary) 30%, transparent);background:color-mix(in srgb, var(--primary) 10%, transparent)}#navigation-items a[href*=\"discord\"]:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-color:color-mix(in srgb, var(--primary) 30%, transparent);background:color-mix(in srgb, var(--primary) 10%, transparent)}#navigation-items a[href*=\"discord\"]:active{background:color-mix(in srgb, var(--primary) 16%, transparent)}#navigation-items a[href*=\"discord\"]::before{content:\"\";display:inline-block;width:16px;height:16px;flex-shrink:0;align-self:center;margin-right:6px;background:url(\"https://cdn.viggle.ai/template/media/20260311/d1b18180-9b8f-44cc-b45d-80a5f1507146.png\") center/contain no-repeat;filter:brightness(0) invert(1)}:root:not(.dark) #navigation-items a[href*=\"discord\"]::before,[data-theme=\"light\"] #navigation-items a[href*=\"discord\"]::before{filter:brightness(0)}#sidebar-content h5,#sidebar-content [class*=\"sidebar-group-header\"]{font-size:0.7rem;font-weight:800;letter-spacing:0.1em;text-transform:uppercase;color:var(--sidebar-heading-color);margin-top:1rem;margin-bottom:0.3rem;padding-bottom:0.25rem}#sidebar-content [class*=\"sidebar-group-header\"]{padding-left:calc(0.45rem + 2px)!important;border-bottom:1px solid var(--sidebar-border-subtle)}#navigation-items>div:first-child>[class*=\"sidebar-group-header\"]{margin-top:0!important}#sidebar-content h5{padding-left:0!important;border-bottom:none}#sidebar-content a{font-size:0.8rem;line-height:1.3;font-weight:400;border-left:2px solid transparent;padding-top:0.3rem;padding-bottom:0.3rem;padding-left:0.45rem;max-width:100%;transition:background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),\n border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),\n color 0.15s cubic-bezier(0.16, 1, 0.3, 1)}#sidebar-content>div.relative{padding-top:0!important}#navigation-items>div{margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important}#navigation-items{display:flex;flex-direction:column}#navigation-items>ul.list-none{order:99;margin-top:auto;padding-top:1rem;padding-left:calc(0.45rem + 2px)!important;margin-left:0}#navigation-items>ul.list-none a{margin-left:0!important}#navigation-items,#navigation-items *{text-align:left}#navigation-items a{display:flex;align-items:flex-start;justify-content:flex-start;padding-left:0.45rem!important;gap:0.35rem;white-space:normal;overflow:visible;overflow-wrap:break-word;word-break:break-word}#navigation-items a>span,#navigation-items a>div{min-width:0;flex:1 1 auto;white-space:normal;overflow:visible}#sidebar-content a:hover{background-color:color-mix(in srgb, var(--primary) 12%, transparent);border-left-color:var(--primary)}#sidebar-content a:active{background-color:color-mix(in srgb, var(--primary) 20%, transparent)}#sidebar-content a:focus-visible{background-color:color-mix(in srgb, var(--primary) 12%, transparent);border-left-color:var(--primary);outline:2px solid var(--primary);outline-offset:-2px}#sidebar-content li[data-active]>a,#sidebar-content li[data-active] a[aria-current=\"page\"]{background-color:color-mix(in srgb, var(--primary) 18%, transparent);border-left-color:var(--primary);font-weight:600}#content-area [role=\"tab\"][data-state=\"active\"],#content-area [role=\"tab\"][aria-selected=\"true\"]{color:var(--primary)}#content-area [role=\"tab\"][data-state=\"active\"]{box-shadow:inset 0 -2px 0 0 var(--primary)}#content-area [role=\"tab\"]:focus-visible{outline-color:var(--primary)}#content-area [role=\"tab\"]:active{opacity:0.8}#content-area .callout{background:transparent;border:none;padding-left:0;padding-right:0;font-size:10pt}#content.mdx-content{margin-top:0}@media (min-width: 1024px){#content-area>header#header{padding-top:1.375rem}}#content-area h2>div>a[aria-label=\"Navigate to header\"],#content-area h3>div>a[aria-label=\"Navigate to header\"],#content-area h4>div>a[aria-label=\"Navigate to header\"]{display:none!important}#content-area h2,#content-area h3{margin-top:2.5rem}li#topbar-cta-button a,li#topbar-cta-button a *{color:#000!important}#table-of-contents{font-size:0.72rem;line-height:1.3}#table-of-contents *{font-size:inherit;line-height:inherit}#table-of-contents a{padding-top:0.1rem;padding-bottom:0.1rem;margin-bottom:0}#table-of-contents>*+*{margin-top:0.25rem}.copy-for-llm-btn-wrapper{position:absolute;top:0;right:0;z-index:10}#copy-for-llm-btn:focus-visible{outline:2px solid var(--primary);outline-offset:2px}#copy-for-llm-btn:active{transform:scale(0.97)}#mobile-nav li{margin-bottom:1px}#mobile-nav h5,#mobile-nav [class*=\"sidebar-group-header\"]{font-size:0.7rem;font-weight:800;letter-spacing:0.1em;text-transform:uppercase;color:var(--sidebar-heading-color);margin-top:1rem;margin-bottom:0.3rem;padding-bottom:0.25rem}#mobile-nav [class*=\"sidebar-group-header\"]{padding-left:calc(0.45rem + 2px)!important;border-bottom:1px solid var(--sidebar-border-subtle)}#mobile-nav h5{padding-left:0!important;border-bottom:none}#mobile-nav>div>div:first-child [class*=\"sidebar-group-header\"],#mobile-nav [class*=\"sidebar-group-header\"]:first-of-type{margin-top:0}#mobile-nav [class*=\"sidebar-group-icon\"],#mobile-nav .sidebar-group-icon,#mobile-nav a>div[class*=\"shrink-0\"],#mobile-nav a>div:first-child:not([class*=\"flex-1\"]),#mobile-nav a svg,#mobile-nav a img{display:none!important}#mobile-nav a{font-size:0.8rem;line-height:1.3;font-weight:400;border-left:2px solid transparent;padding-top:0.3rem;padding-bottom:0.3rem;padding-left:0.45rem!important;display:flex;align-items:flex-start;justify-content:flex-start;text-align:left;gap:0.35rem;white-space:normal;overflow-wrap:break-word;word-break:break-word;transition:background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),\n border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),\n color 0.15s cubic-bezier(0.16, 1, 0.3, 1)}#mobile-nav a>span,#mobile-nav a>div{min-width:0;flex:1 1 auto;white-space:normal;overflow:visible}#mobile-nav a:hover{background-color:color-mix(in srgb, var(--primary) 12%, transparent);border-left-color:var(--primary)}#mobile-nav a:active{background-color:color-mix(in srgb, var(--primary) 20%, transparent)}#mobile-nav a:focus-visible{background-color:color-mix(in srgb, var(--primary) 12%, transparent);border-left-color:var(--primary);outline:2px solid var(--primary);outline-offset:-2px}#mobile-nav li[data-active]>a,#mobile-nav li[data-active] a[aria-current=\"page\"],#mobile-nav a.bg-primary\\/10,#mobile-nav a[class*=\"bg-primary\"]{background-color:color-mix(in srgb, var(--primary) 18%, transparent);border-left-color:var(--primary);font-weight:600}#mobile-nav>div{margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important}#mobile-nav a[href*=\"discord\"]{width:fit-content;padding:6px 12px;border:1px solid var(--sidebar-border-subtle);background:color-mix(in srgb, var(--primary) 4%, transparent);transition:background 0.15s cubic-bezier(0.16, 1, 0.3, 1),\n border-color 0.15s cubic-bezier(0.16, 1, 0.3, 1)}#mobile-nav a[href*=\"discord\"]:hover{border-color:color-mix(in srgb, var(--primary) 30%, transparent);background:color-mix(in srgb, var(--primary) 10%, transparent)}#mobile-nav a[href*=\"discord\"]::before{content:\"\";display:inline-block;width:16px;height:16px;flex-shrink:0;align-self:center;margin-right:6px;background:url(\"https://cdn.viggle.ai/template/media/20260311/d1b18180-9b8f-44cc-b45d-80a5f1507146.png\") center/contain no-repeat;filter:brightness(0) invert(1)}:root:not(.dark) #mobile-nav a[href*=\"discord\"]::before,[data-theme=\"light\"] #mobile-nav a[href*=\"discord\"]::before{filter:brightness(0)}#mobile-nav ul.list-none{order:99;margin-top:auto;padding-top:1rem;padding-left:calc(0.45rem + 2px)!important;margin-left:0}#mobile-nav ul.list-none a{margin-left:0!important}.plugin-download{display:flex;align-items:center;gap:0.8rem;flex-wrap:wrap;margin:1.25rem 0;padding:1rem;border:1px solid var(--sidebar-border-subtle);background:color-mix(in srgb, var(--primary) 4%, transparent)}.plugin-download-button{appearance:none;border:1px solid var(--primary);background:var(--primary);color:white;padding:0.65rem 0.9rem;font:inherit;font-weight:600;line-height:1.25;cursor:pointer;transition:opacity 0.15s ease, background 0.15s ease}.plugin-download-button:hover{opacity:0.85}.plugin-download-button:focus-visible{outline:2px solid var(--primary);outline-offset:3px}.plugin-download-button:disabled{cursor:wait;opacity:0.65}.plugin-download-meta{color:var(--sidebar-heading-color);font-size:0.875rem}@media (prefers-reduced-motion: reduce){*,*::before,*::after{transition-duration:0.01ms!important;animation-duration:0.01ms!important}}"}],"page":{"pagePath":"v1/api-reference/images/create","slug":"/v1/api-reference/images/create","pageMetadata":{"title":"Generate Image","openapi":"openapi.yaml POST /v1/images","description":"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.","href":"/v1/api-reference/images/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading,Note,Table}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`multipart/form-data`}),` with a `,_jsx(_components.code,{children:`prompt`}),` and, optionally, reference images. The request is asynchronous: it answers immediately with a `,_jsx(_components.code,{children:`queued`}),` `,_jsx(_components.a,{href:`/v1/api-reference/images/get`,children:`Image`}),` object whose ID starts with `,_jsx(_components.code,{children:`img_`}),`, and you poll `,_jsx(_components.a,{href:`/v1/api-reference/images/get`,children:`Get Image`}),` until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`ready`}),` or `,_jsx(_components.code,{children:`failed`}),`. Without reference images this is text-to-image; with at least one, the model is guided by them.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Pricing`}),` (1 credit = $0.01): `,_jsx(_components.strong,{children:`1 credit ($0.01) per image`}),` at `,_jsx(_components.code,{children:`1K`}),`, `,_jsx(_components.strong,{children:`2 credits ($0.02) per image`}),` at `,_jsx(_components.code,{children:`2K`}),`. A job costs `,_jsx(_components.code,{children:`n`}),` × the per-image price — for example, `,_jsx(_components.code,{children:`2K`}),` with `,_jsx(_components.code,{children:`n=3`}),` is 6 credits. The whole amount is reserved when the job is created and refunded in full if it fails. `,_jsx(_components.code,{children:`aspect_ratio`}),`, `,_jsx(_components.code,{children:`seed`}),`, and reference images don’t affect price. See `,_jsx(_components.a,{href:`/v1/pricing#viggle-image`,children:`Pricing and retention`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-parameters`,children:`Request parameters`}),`\n`,_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`multipart/form-data`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{style:{textAlign:`center`},children:`Required`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{style:{textAlign:`center`},children:`Yes`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Text description of the images. Up to 4000 characters, counted as Unicode code points (one CJK character counts as one). Must not be blank.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`aspect_ratio`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{style:{textAlign:`center`},children:`No`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1:1`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`1:1`}),`, `,_jsx(_components.code,{children:`16:9`}),`, `,_jsx(_components.code,{children:`9:16`}),`, `,_jsx(_components.code,{children:`4:3`}),`, `,_jsx(_components.code,{children:`3:4`}),`, `,_jsx(_components.code,{children:`3:2`}),`, or `,_jsx(_components.code,{children:`2:3`}),`. Together with `,_jsx(_components.code,{children:`resolution`}),`, selects the exact output size — see `,_jsx(_components.a,{href:`#output-sizes`,children:`Output sizes`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`resolution`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{style:{textAlign:`center`},children:`No`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1K`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`1K`}),` or `,_jsx(_components.code,{children:`2K`}),`, case-insensitive. Sets the output size tier and the per-image price: 1 credit at `,_jsx(_components.code,{children:`1K`}),`, 2 credits at `,_jsx(_components.code,{children:`2K`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`n`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{style:{textAlign:`center`},children:`No`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:`Number of images to generate, 1–6.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`seed`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{style:{textAlign:`center`},children:`No`}),_jsx(_components.td,{children:`random`}),_jsxs(_components.td,{children:[`0–2147483647. Image `,_jsx(_components.code,{children:`i`}),` (counting from 0) uses `,_jsx(_components.code,{children:`(seed + i) mod 2147483648`}),`. Omitted, the server picks a random seed. Every image reports the seed it actually used.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reference_image`})}),_jsx(_components.td,{children:`file, repeatable`}),_jsx(_components.td,{style:{textAlign:`center`},children:`No`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Reference image upload, up to 24 MiB each. Repeat the field to send more than one.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reference_image_url`})}),_jsx(_components.td,{children:`string, repeatable`}),_jsx(_components.td,{style:{textAlign:`center`},children:`No`}),_jsx(_components.td,{children:`—`}),_jsxs(_components.td,{children:[`Publicly reachable `,_jsx(_components.code,{children:`http(s)`}),` image URL, under the same limits as `,_jsx(_components.code,{children:`reference_image`}),`. Repeat the field to send more than one.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Up to `,_jsx(_components.strong,{children:`8 reference images`}),` in total, as any mix of `,_jsx(_components.code,{children:`reference_image`}),` and `,_jsx(_components.code,{children:`reference_image_url`}),`. The model receives the uploaded files first, then the URLs, each in the order you sent them. Supplying any reference image moves `,_jsx(_components.code,{children:`2K`}),` to a smaller size — see the next section.`]}),`\n`,_jsx(Heading,{level:`3`,id:`reference-image-limits`,children:`Reference image limits`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Up to 24 MiB each, with a long-to-short side ratio of at most 8.`}),`\n`,_jsx(_components.li,{children:`JPEG, PNG, WebP, GIF, BMP, TIFF, or HEIC.`}),`\n`,_jsx(_components.li,{children:`An image with a long side of 3840 px or more, or a short side of 2160 px or more, is first downscaled, keeping its aspect ratio, to fit within 1920 × 1080 (1080 × 1920 for a portrait image).`}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.code,{children:`reference_image_url`}),` must be publicly reachable; it is downloaded while the create request is being processed.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`output-sizes`,children:`Output sizes`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`aspect_ratio`}),` and `,_jsx(_components.code,{children:`resolution`}),` together select one of the model’s fixed sizes — you get exactly the size listed. Width × height, in pixels:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:_jsx(_components.code,{children:`aspect_ratio`})}),_jsx(_components.th,{children:_jsx(_components.code,{children:`1K`})}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`2K`}),` (text only)`]}),_jsxs(_components.th,{children:[_jsx(_components.code,{children:`2K`}),` (with reference images)`]})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1:1`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1024 × 1024`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2048 × 2048`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1536 × 1536`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`16:9`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1376 × 768`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2720 × 1536`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2048 × 1152`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`9:16`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`768 × 1376`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1536 × 2720`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1152 × 2048`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4:3`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1184 × 896`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2368 × 1760`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1760 × 1344`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3:4`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`896 × 1184`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1760 × 2368`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1344 × 1760`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3:2`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1248 × 832`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`2496 × 1664`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1888 × 1248`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2:3`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:`832 × 1248`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1664 × 2496`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1248 × 1888`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`1K`}),` is the same with or without reference images. `,_jsx(_components.code,{children:`2K`}),` is about 2048² pixels of area for text-to-image and about 1536² with reference images; the price is the same either way. Each image’s `,_jsx(_components.code,{children:`width`}),` and `,_jsx(_components.code,{children:`height`}),` in the response are its actual size.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-parameters`,children:`Response parameters`}),`\n`,_jsxs(_components.p,{children:[`Returns `,_jsx(_components.code,{children:`200 OK`}),` with an Image object in `,_jsx(_components.code,{children:`queued`}),` state — the same shape `,_jsx(_components.a,{href:`/v1/api-reference/images/get`,children:`Get Image`}),` returns. `,_jsx(_components.code,{children:`progress`}),` is `,_jsx(_components.code,{children:`0`}),`, `,_jsx(_components.code,{children:`images`}),` is empty, and `,_jsx(_components.code,{children:`completed_at`}),` and `,_jsx(_components.code,{children:`error`}),` are `,_jsx(_components.code,{children:`null`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"img_b16a190d-2d44-41a0-8056-ef68183c3b9e\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queued\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"progress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-12T08:20:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`common-errors`,children:`Common errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Error`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 INVALID_REQUEST`})}),_jsxs(_components.td,{children:[`A parameter is invalid — `,_jsx(_components.code,{children:`message`}),` names which one — or the body isn’t `,_jsx(_components.code,{children:`multipart/form-data`}),`. No job is created and no file is uploaded.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`401 UNAUTHENTICATED`})}),_jsx(_components.td,{children:`Missing or invalid API key.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`402 INSUFFICIENT_CREDITS`})}),_jsxs(_components.td,{children:[`The balance can’t cover `,_jsx(_components.code,{children:`n`}),` × the per-image price; `,_jsx(_components.code,{children:`message`}),` gives the credits required. No generation starts.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`429 RATE_LIMITED`})}),_jsx(_components.td,{children:`Too many concurrent create requests on the same key. Retry later.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`500 INTERNAL_ERROR`})}),_jsx(_components.td,{children:`Internal server error. Retryable.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`503 SERVICE_BUSY`})}),_jsx(_components.td,{children:`Service temporarily unavailable. Retryable.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`HTTP errors use the standard envelope — `,_jsx(_components.code,{children:`{\"error\": {\"code\", \"message\", \"retryable\", \"request_id\", \"details\", \"remediation\"}}`}),`. See `,_jsx(_components.a,{href:`/v1/production/errors`,children:`Errors and recovery`}),`. A job that is accepted and later fails reports its failure in the Image object’s `,_jsx(_components.code,{children:`error`}),` field instead — see `,_jsx(_components.a,{href:`/v1/api-reference/images/get#status-and-errors`,children:`Get Image`}),`.`]}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`Send your own `,_jsx(_components.code,{children:`User-Agent`}),` header. Python `,_jsx(_components.code,{children:`urllib`}),`’s default `,_jsx(_components.code,{children:`User-Agent`}),` has been observed to be blocked in front of `,_jsx(_components.code,{children:`apis.viggle.ai`}),`, which answers with a non-JSON error page instead of an API error.`]}),_jsxs(_components.p,{children:[`The body must be `,_jsx(_components.code,{children:`multipart/form-data`}),`, even without reference images — an `,_jsx(_components.code,{children:`application/x-www-form-urlencoded`}),` body gets `,_jsx(_components.code,{children:`400`}),`. With Python `,_jsx(_components.code,{children:`requests`}),`, pass the fields through `,_jsx(_components.code,{children:`files=`}),` (as below), not `,_jsx(_components.code,{children:`data=`}),` alone.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://apis.viggle.ai/v1/images`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$VIGGLE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` prompt=\"A watercolor fox reading a book under a maple tree\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` aspect_ratio=16:9`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` resolution=1K`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` n=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`fields `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A watercolor fox reading a book under a maple tree\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"16:9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://apis.viggle.ai/v1/images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'VIGGLE_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` files`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{name: (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, value) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` name, value `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fields.items()}, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# forces multipart/form-data`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`image `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` form`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FormData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A watercolor fox reading a book under a maple tree\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"16:9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://apis.viggle.ai/v1/images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`VIGGLE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` image`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,numberOfLines:`5`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`bytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Buffer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{}; `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` multipart`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewWriter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WriteField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A watercolor fox reading a book under a maple tree\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WriteField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"16:9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WriteField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WriteField`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Close`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`_`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://apis.viggle.ai/v1/images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Header`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`os`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Getenv`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"VIGGLE_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)); `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Header`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Set`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`w`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FormDataContentType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DefaultClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Do`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`panic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) }; `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`defer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Close`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`with-reference-images`,children:`With reference images`}),`\n`,_jsx(_components.p,{children:`Uploads and URLs can be mixed, and both fields can be repeated:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://apis.viggle.ai/v1/images`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$VIGGLE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` prompt=\"The same fox, now in winter, snow falling\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` aspect_ratio=1:1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` resolution=2K`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` [email protected]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` reference_image_url=https://example.com/style.jpg`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os, requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fox.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fox:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://apis.viggle.ai/v1/images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'VIGGLE_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The same fox, now in winter, snow falling\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1:1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reference_image_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/style.jpg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` files`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reference_image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, (`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fox.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, fox, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image/png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`image `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`openAsBlob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"node:fs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` form`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FormData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The same fox, now in winter, snow falling\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aspect_ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1:1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reference_image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` openAsBlob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fox.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fox.png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"reference_image_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/style.jpg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://apis.viggle.ai/v1/images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`VIGGLE_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` image`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`@viggle/sdk`,children:_jsx(_components.code,{children:`@viggle/sdk`})}),`\n`,_jsxs(_components.p,{children:[`Requires an `,_jsx(_components.code,{children:`@viggle/sdk`}),` version that includes the `,_jsx(_components.code,{children:`images`}),` resource.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Viggle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@viggle/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` viggle`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Viggle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`VIGGLE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` image`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` viggle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`images`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"A watercolor fox reading a book under a maple tree\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` aspectRatio:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"16:9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` resolution:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"1K\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` n:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// image.id, image.status (\"queued\"); poll with viggle.images.get(image.id)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`next-step`,children:`Next step`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.a,{href:`/v1/api-reference/images/get`,children:`Get Image`}),` with the returned `,_jsx(_components.code,{children:`id`}),` to poll for the result.`]}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Quick Start: Viggle Image`,icon:`rocket`,href:`/v1/guides/quickstart-image`,children:_jsx(_components.p,{children:`Follow the complete create, poll, and download flow.`})}),_jsx(Card,{title:`Get Image`,icon:`image`,href:`/v1/api-reference/images/get`,children:_jsx(_components.p,{children:`Read the job’s status, image URLs, sizes, and seeds.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate Image","openapi":"openapi.yaml POST /v1/images","description":"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.","href":"/v1/api-reference/images/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request parameters","slug":"request-parameters","depth":2,"children":[{"title":"Reference image limits","slug":"reference-image-limits","depth":3,"children":[]}]},{"title":"Output sizes","slug":"output-sizes","depth":2,"children":[]},{"title":"Response parameters","slug":"response-parameters","depth":2,"children":[]},{"title":"Common errors","slug":"common-errors","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[{"title":"With reference images","slug":"with-reference-images","depth":3,"children":[]},{"title":"@viggle/sdk","slug":"@viggle/sdk","depth":3,"children":[]}]},{"title":"Next step","slug":"next-step","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/warpenginecanadainc/b511c7b52cbc4efe/scripts/copy-for-llm.js","/_mintlify/custom/warpenginecanadainc/40a9053583fb420a/scripts/annotate-unity-screenshots.js"],"openApiReferenceData":{"operation":{"operationId":"createImage","summary":"Generate images","description":"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.","tags":["Images"],"parameters":["1a83d085-01f7-4972-a39f-68f05946a1fa","c3abec8a-2219-45be-a881-4d3add071706"],"requestBody":"f3e6edfb-1e77-4827-a83d-dc709d8a030c","responses":{"200":"90dbec58-6217-4ac1-84bb-c9b0e7291e1c","400":"a0b06127-fdec-45c9-9f34-555c3b47c3c9","401":"797dc7d3-d23a-47d8-9431-063a86dceacc","402":"093eba7c-1132-4444-b33f-e69380a9580b","403":"a76161dc-867b-48df-9605-b3d3cb554f79","429":"e87fb5e8-0ea1-42d0-9345-a4971e890ab3","500":"fb06aab6-3ee8-4c6b-967c-ba6a42102581","503":"f6a9c438-cd6f-4bc0-88aa-123e2d60f795"},"method":"post","type":"path","servers":["2256a388-a366-46f6-8bdc-079b223d2810"],"security":["cd6c5e8c-360f-45f4-a00c-667242b4b56c"],"path":"/v1/images","baseUrlOptions":["https://apis.viggle.ai"],"title":"Generate images","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"1a83d085-01f7-4972-a39f-68f05946a1fa":{"name":"X-Request-Id","in":"header","required":false,"description":"Optional caller-supplied correlation ID, up to 128 characters. The service returns the effective value in the response header for tracing and support.","schema":{"type":"string","minLength":1,"maxLength":128,"isRequired":false,"description":"Optional caller-supplied correlation ID, up to 128 characters. The service returns the effective value in the response header for tracing and support.","uniqueKey":"","typeLabel":"string"}},"c3abec8a-2219-45be-a881-4d3add071706":{"name":"X-Viggle-Source","in":"header","required":false,"description":"Optional source-channel label, up to 128 characters, used to attribute traffic to an SDK, integration, product surface, or internal workflow.","schema":{"type":"string","minLength":1,"maxLength":128,"isRequired":false,"description":"Optional source-channel label, up to 128 characters, used to attribute traffic to an SDK, integration, product surface, or internal workflow.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"description":"Body of `POST /v1/images`, `multipart/form-data` only. Text-to-image\nwhen no reference image is supplied, reference-guided generation when\nat least one is. `aspect_ratio` and `resolution` select one of the\nmodel's fixed output sizes (width × height, in pixels); with\nreference images, `2K` is a smaller size than without:\n\n| aspect_ratio | 1K | 2K | 2K with reference images |\n| --- | --- | --- | --- |\n| 1:1 | 1024×1024 | 2048×2048 | 1536×1536 |\n| 16:9 | 1376×768 | 2720×1536 | 2048×1152 |\n| 9:16 | 768×1376 | 1536×2720 | 1152×2048 |\n| 4:3 | 1184×896 | 2368×1760 | 1760×1344 |\n| 3:4 | 896×1184 | 1760×2368 | 1344×1760 |\n| 3:2 | 1248×832 | 2496×1664 | 1888×1248 |\n| 2:3 | 832×1248 | 1664×2496 | 1248×1888 |\n\nUp to 8 reference images in total, as any mix of `reference_image`\nuploads and `reference_image_url` URLs. The model receives the\nuploads first, then the URLs, each in the order sent.\n","type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000,"description":"Text description of the images. Up to 4000 characters, counted as Unicode code points (one CJK character counts as one). Must not be blank.","isRequired":true,"uniqueKey":"prompt","typeLabel":"string"},"aspect_ratio":{"type":"string","enum":["1:1","16:9","9:16","4:3","3:4","3:2","2:3"],"default":"1:1","description":"Output aspect ratio. Together with `resolution`, it selects the exact output size.","uniqueKey":"aspect_ratio","typeLabel":"enum\u003cstring>"},"resolution":{"type":"string","enum":["1K","2K"],"default":"1K","description":"Output size tier, case-insensitive, and the price of each image — 1 credit at `1K`, 2 credits at `2K`. With any reference image, `2K` is about 1536² pixels instead of about 2048².","uniqueKey":"resolution","typeLabel":"enum\u003cstring>"},"n":{"type":"integer","minimum":1,"maximum":6,"default":1,"description":"Number of images to generate. The job reserves `n` × the per-image price.","uniqueKey":"n","typeLabel":"integer"},"seed":{"type":"integer","format":"int64","minimum":0,"maximum":2147483647,"description":"Image `i` (counting from 0) is generated with seed\n`(seed + i) mod 2147483648`. Omitted, the server picks a random\nseed; each image reports the seed it used.\n","uniqueKey":"seed","typeLabel":"integer\u003cint64>"},"reference_image":{"type":"array","maxItems":8,"items":{"type":"string","format":"binary","uniqueKey":"reference_image.items.[INDEX]","typeLabel":"file"},"description":"Reference image upload; repeat the field for more than one. Each up to 24 MiB, with a long-to-short side ratio of at most 8; JPEG, PNG, WebP, GIF, BMP, TIFF, or HEIC. Counts toward the 8-image total shared with `reference_image_url`.","uniqueKey":"reference_image","typeLabel":"file[]"},"reference_image_url":{"type":"array","maxItems":8,"items":{"type":"string","format":"uri","uniqueKey":"reference_image_url.items.[INDEX]","typeLabel":"string\u003curi>"},"description":"Publicly reachable http(s) reference image URL, downloaded while the create request is processed; repeat the field for more than one. Same limits as `reference_image`, and counts toward the same 8-image total.","uniqueKey":"reference_image_url","typeLabel":"string\u003curi>[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"prompt":"\u003cstring>","aspect_ratio":"1:1","resolution":"1K","n":1,"seed":1073741823,"reference_image":["\u003cstring>"],"reference_image_url":["\u003cstring>"]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"90dbec58-6217-4ac1-84bb-c9b0e7291e1c":{"description":"Image generation accepted and queued.","headers":{"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"description":"An image generation job (`img_` prefix), returned by both\n`POST /v1/images` and `GET /v1/images/{image_id}`. It only moves\nforward — `queued` → `processing` → `ready` or `failed` — and is\nnever `cancelled`. `images` stays empty until the job is `ready`,\nthen lists every generated image in request order. A job either\nproduces all `n` images or fails; it never returns a partial set.\n","type":"object","additionalProperties":false,"required":["id","status","progress","images","created_at","completed_at","error"],"properties":{"id":{"type":"string","minLength":1,"description":"Public image job ID, `img_` prefix.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"status":{"type":"string","enum":["queued","processing","ready","failed"],"description":"Lifecycle state. `ready` and `failed` are terminal.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"progress":{"oneOf":[{"type":"integer","minimum":0,"maximum":100,"description":"Share of the requested images generated so far — `0` while queued, 0–99 while processing, `100` when ready, null when failed.","isRequired":true,"uniqueKey":"progress.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":0,"maximum":100,"description":"Share of the requested images generated so far — `0` while queued, 0–99 while processing, `100` when ready, null when failed.","isRequired":true,"uniqueKey":"progress.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"progress","typeLabel":"integer | null"},"images":{"type":"array","description":"Empty until `ready`, then all `n` generated images in request order.","items":{"type":"object","additionalProperties":false,"required":["url","width","height","seed"],"properties":{"url":{"oneOf":[{"type":"string","format":"uri","description":"Signed download URL of the PNG, valid for 1 hour; fetch the job again for a fresh one. Null once the file has been deleted, 24 hours after the job finished.","isRequired":true,"uniqueKey":"images.items.[INDEX].url.oneOf.0","typeLabel":"string\u003curi>"},{"type":"null","format":"uri","description":"Signed download URL of the PNG, valid for 1 hour; fetch the job again for a fresh one. Null once the file has been deleted, 24 hours after the job finished.","isRequired":true,"uniqueKey":"images.items.[INDEX].url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"images.items.[INDEX].url","typeLabel":"string\u003curi> | null"},"width":{"type":"integer","minimum":1,"description":"Actual width in pixels.","isRequired":true,"uniqueKey":"images.items.[INDEX].width","typeLabel":"integer"},"height":{"type":"integer","minimum":1,"description":"Actual height in pixels.","isRequired":true,"uniqueKey":"images.items.[INDEX].height","typeLabel":"integer"},"seed":{"type":"integer","format":"int64","minimum":0,"description":"Seed actually used for this image.","isRequired":true,"uniqueKey":"images.items.[INDEX].seed","typeLabel":"integer\u003cint64>"}},"uniqueKey":"images.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"images","typeLabel":"object[]"},"created_at":{"oneOf":[{"type":"string","format":"date-time","description":"Creation timestamp, RFC 3339.","isRequired":true,"uniqueKey":"created_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Creation timestamp, RFC 3339.","isRequired":true,"uniqueKey":"created_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time> | null"},"completed_at":{"oneOf":[{"type":"string","format":"date-time","description":"Terminal-state timestamp; set once the job is `ready` or `failed`, null before that.","isRequired":true,"uniqueKey":"completed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Terminal-state timestamp; set once the job is `ready` or `failed`, null before that.","isRequired":true,"uniqueKey":"completed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"completed_at","typeLabel":"string\u003cdate-time> | null"},"error":{"oneOf":[{"type":"object","description":"Failure details, only when `status` is `failed`; otherwise null.\n`code` is `SERVICE_BUSY` (retryable — the generation service is\nbusy or unavailable, or the job did not finish within 15\nminutes), `TASK_FAILED` (retryable — any other generation or\nupload failure), or `INVALID_REQUEST` (not retryable — the model\nrejected the request, for example an unusable reference image).\n","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.oneOf.0.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.oneOf.0.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.oneOf.0.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.oneOf.0.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.oneOf.0.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.oneOf.0.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.oneOf.0.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.oneOf.0.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.oneOf.0.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.oneOf.0.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","status":"queued","progress":50,"images":[{"url":"\u003cstring>","width":2,"height":2,"seed":1}],"created_at":"2023-11-07T05:31:56Z","completed_at":"2023-11-07T05:31:56Z","error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"a0b06127-fdec-45c9-9f34-555c3b47c3c9":{"description":"Invalid request.","headers":{"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"797dc7d3-d23a-47d8-9431-063a86dceacc":{"description":"Missing, invalid, or expired credential.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}},"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"093eba7c-1132-4444-b33f-e69380a9580b":{"description":"Insufficient credits.","headers":{"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"a76161dc-867b-48df-9605-b3d3cb554f79":{"description":"Credential does not grant access to this resource.","headers":{"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e87fb5e8-0ea1-42d0-9345-a4971e890ab3":{"description":"Rate limit exceeded.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":0}},"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"fb06aab6-3ee8-4c6b-967c-ba6a42102581":{"description":"Unexpected server error.","headers":{"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"},"f6a9c438-cd6f-4bc0-88aa-123e2d60f795":{"description":"Service temporarily unavailable.","headers":{"Retry-After":{"schema":{"type":"integer","minimum":0}},"X-Request-Id":{"description":"Stable request identifier for support and tracing.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","description":"Top-level draft-flow error payload containing the stable code, message, retry guidance, correlation ID, and error-specific details.","required":["code","message","retryable","request_id","details","remediation"],"properties":{"code":{"type":"string","description":"Stable error category from the draft-based render error vocabulary.","enum":["UNAUTHENTICATED","INVALID_CREDENTIAL","FORBIDDEN","INVALID_REQUEST","INVALID_CHARACTER","INVALID_MOTION","UNSUPPORTED_MEDIA","CONTENT_POLICY_VIOLATION","UPLOAD_REQUIRED","UPLOAD_MISMATCH","UPLOAD_EXPIRED","DRAFT_NOT_FOUND","DRAFT_ALREADY_CONSUMED","RENDER_NOT_FOUND","RENDER_NOT_CANCELLABLE","CHARACTER_NOT_FOUND","MOTION_NOT_FOUND","MOTION_NOT_READY","MOTION_TEMPLATE_NOT_FOUND","AVATAR_NOT_FOUND","ANIMATION_NOT_FOUND","EXTRACTION_UNAVAILABLE","EXTRACTION_FAILED","IDEMPOTENCY_KEY_REUSED","INSUFFICIENT_CREDITS","RATE_LIMITED","SERVICE_BUSY","INTERNAL_ERROR","NOT_FOUND","TASK_FAILED","PROCESSING_FAILED"],"isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation suitable for logs or presentation to a developer.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether retrying the operation without changing its semantic input may succeed.","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"request_id":{"type":"string","description":"Correlation identifier for tracing and support. Include it when reporting the failure.","isRequired":true,"uniqueKey":"error.request_id","typeLabel":"string"},"details":{"type":"object","description":"Error-specific structured context; available keys depend on `code`.","additionalProperties":true,"isRequired":true,"uniqueKey":"error.details","typeLabel":"object"},"remediation":{"type":"object","description":"Suggested recovery action and optional retry delay.","required":["action","retry_after_ms"],"properties":{"action":{"type":"string","description":"Suggested machine-readable or human-readable next action, such as retrying later, uploading media again, or correcting input.","isRequired":true,"uniqueKey":"error.remediation.action","typeLabel":"string"},"retry_after_ms":{"oneOf":[{"type":"integer","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.0","typeLabel":"integer\u003cint64>"},{"type":"null","description":"Recommended delay in milliseconds before retrying; null when no timed retry is advised.","format":"int64","minimum":0,"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.remediation.retry_after_ms","typeLabel":"integer\u003cint64> | null"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.remediation","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHENTICATED","message":"\u003cstring>","retryable":true,"request_id":"\u003cstring>","details":{},"remediation":{"action":"\u003cstring>","retry_after_ms":1}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"cd6c5e8c-360f-45f4-a00c-667242b4b56c":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key or OAuth access token","description":"Server-side SDK clients use a project API key. Remote MCP clients use\nan OAuth access token. Never expose a project API key in browser code.\n","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"2256a388-a366-46f6-8bdc-079b223d2810":{"url":"https://apis.viggle.ai","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"API key or OAuth access token","description":"Server-side SDK clients use a project API key. Remote MCP clients use\nan OAuth access token. Never expose a project API key in browser code.\n","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Server-side SDK clients use a project API key. Remote MCP clients use\nan OAuth access token. Never expose a project API key in browser code.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"warpenginecanadainc","siteName":"Viggle API","title":"Generate Image - Viggle API","navMaps":{"firstHrefInVersion":{"V1":{"href":"/v1/api-reference/images/create","matchLevel":0}},"firstHrefInLanguage":{"en":{"href":"/v1/api-reference/images/create","matchLevel":0},"zh":{"href":"/zh/v1/api-reference/images/create","matchLevel":1}}},"lastModified":"2026-11-12T08:04:37.285Z","originalFileLocation":"v1/api-reference/images/create.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Viggle API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Image - Viggle API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Viggle API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.viggle.ai/v1/api-reference/images/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://warpenginecanadainc.mintlify.site/_mintlify/api/og/v2?division=Viggle+Image\u0026amp;title=Generate+Image\u0026amp;description=Generate+1%E2%80%936+PNG+images+from+a+text+prompt%2C+optionally+guided+by+up+to+8+reference+images.\u0026amp;theme=2b08c4ed0ded0f4ca3d53b14\u0026amp;signature=1f67c5f29985aa6983b04a5f938d83a4c41b515716acc7cdb5d03b9535b32146\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate Image - Viggle API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://warpenginecanadainc.mintlify.site/_mintlify/api/og/v2?division=Viggle+Image\u0026amp;title=Generate+Image\u0026amp;description=Generate+1%E2%80%936+PNG+images+from+a+text+prompt%2C+optionally+guided+by+up+to+8+reference+images.\u0026amp;theme=2b08c4ed0ded0f4ca3d53b14\u0026amp;signature=1f67c5f29985aa6983b04a5f938d83a4c41b515716acc7cdb5d03b9535b32146\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/warpenginecanadainc/4sPmwNBJ_mLW4wXj/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Viggle API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006B24\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.viggle.ai/v1/api-reference/images/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v1/api-reference/images/create.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.viggle.ai/v1/api-reference/images/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.viggle.ai/zh/v1/api-reference/images/create\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.viggle.ai/v1/api-reference/images/create\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.viggle.ai/#organization\",\"name\":\"Viggle API\",\"url\":\"https://docs.viggle.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/warpenginecanadainc/oTXNibAtWbuw3JwC/logo/viggle-logo.png?fit=max\u0026auto=format\u0026n=oTXNibAtWbuw3JwC\u0026q=85\u0026s=2f347195e8ecb0ee0b937a6ab0bb9d42\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.viggle.ai#website\",\"name\":\"Viggle API\",\"url\":\"https://docs.viggle.ai\",\"publisher\":{\"@id\":\"https://docs.viggle.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.viggle.ai/v1/api-reference/images/create#webpage\",\"url\":\"https://docs.viggle.ai/v1/api-reference/images/create\",\"name\":\"Generate Image\",\"description\":\"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.\",\"dateModified\":\"2026-11-12T08:04:37.285Z\",\"isPartOf\":{\"@id\":\"https://docs.viggle.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.viggle.ai/v1/api-reference/images/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.viggle.ai/v1/api-reference/images/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Viggle API\",\"item\":\"https://docs.viggle.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Image\",\"item\":\"https://docs.viggle.ai/v1/api-reference/images/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.viggle.ai/v1/api-reference/images/create#apireference\",\"headline\":\"Generate Image\",\"name\":\"Generate Image\",\"description\":\"Generate 1–6 PNG images from a text prompt, optionally guided by up to 8 reference images.\",\"url\":\"https://docs.viggle.ai/v1/api-reference/images/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.viggle.ai/v1/api-reference/images/create#webpage\"},\"dateModified\":\"2026-11-12T08:04:37.285Z\",\"publisher\":{\"@id\":\"https://docs.viggle.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.viggle.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Viggle API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Viggle API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v1/api-reference/images/create.md","siteName":"Viggle API","nav":{"global":null,"languages":[{"language":"en","default":true,"versions":[{"version":"V1","default":true,"tag":"Latest","tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/v1/guides/quickstart-reference-to-video"}]},{"tab":"API Reference","groups":[{"group":"Account","pages":[{"title":"V1 API reference","href":"/v1/api-reference/overview"},{"title":"Credits","openapi":"openapi.yaml GET /v1/credits","href":"/v1/api-reference/credits"}]},{"group":"Scene Model","pages":[{"title":"Create Scene","openapi":"openapi.yaml POST /v1/scenes/pano","href":"/v1/api-reference/scenes/pano"},{"title":"Create Scene from Custom Panorama","openapi":"openapi.yaml POST /v1/scenes/custom-pano","href":"/v1/api-reference/scenes/custom-pano"},{"title":"Generate Scene Views","openapi":"openapi.yaml POST /v1/scenes/generate","href":"/v1/api-reference/scenes/generate"},{"title":"Reconstruct Scene","openapi":"openapi.yaml POST /v1/scenes/reconstruct","href":"/v1/api-reference/scenes/reconstruct"},{"title":"Get Scene Task","openapi":"openapi.yaml GET /v1/scenes/{task_id}","href":"/v1/api-reference/scenes/get"}]},{"group":"Characters","pages":[{"title":"Create Character (from Image)","openapi":"openapi.yaml POST /v1/characters","href":"/v1/api-reference/characters/create"},{"title":"List Characters","openapi":"openapi.yaml GET /v1/characters","href":"/v1/api-reference/characters/list"},{"title":"Get Character","openapi":"openapi.yaml GET /v1/characters/{character_id}","href":"/v1/api-reference/characters/get"},{"title":"Delete Character","openapi":"openapi.yaml DELETE /v1/characters/{character_id}","href":"/v1/api-reference/characters/delete"},{"title":"Export 3D Character (for 3D/game engines)","openapi":"openapi.yaml GET /v1/characters/{character_id}/export","href":"/v1/api-reference/characters/export"}]},{"group":"Motions","pages":[{"title":"Create Motion (from Video)","openapi":"openapi.yaml POST /v1/motions","href":"/v1/api-reference/motions/create"},{"title":"Create Motion (from Text)","openapi":"openapi.yaml POST /v1/motions","href":"/v1/api-reference/motions/create-from-text"},{"title":"Import Motion","openapi":"openapi.yaml POST /v1/motions/import","href":"/v1/api-reference/motions/import"},{"title":"List Motions","openapi":"openapi.yaml GET /v1/motions","href":"/v1/api-reference/motions/list"},{"title":"Get Motion","openapi":"openapi.yaml GET /v1/motions/{motion_id}","href":"/v1/api-reference/motions/get"},{"title":"Delete Motion","openapi":"openapi.yaml DELETE /v1/motions/{motion_id}","href":"/v1/api-reference/motions/delete"},{"title":"Export 3D Motion (for 3D/game engines)","openapi":"openapi.yaml GET /v1/motions/{motion_id}/export","href":"/v1/api-reference/motions/export"}]},{"group":"Renders","pages":[{"title":"Prepare Render","openapi":"openapi.yaml POST /v1/renders/prepare","href":"/v1/api-reference/renders/prepare"},{"title":"Render Video (from Character and/or Motion)","openapi":"openapi.yaml POST /v1/renders","href":"/v1/api-reference/renders/create"},{"title":"Watch Render","openapi":"openapi.yaml GET /v1/renders/{render_id}/events","href":"/v1/api-reference/renders/events"},{"title":"Download Render","openapi":"openapi.yaml GET /v1/renders/{render_id}/download","href":"/v1/api-reference/renders/download"}]},{"group":"Videos","pages":[{"title":"Generate Video (from Text)","openapi":"openapi.yaml POST /v1/videos","href":"/v1/api-reference/videos/create-from-text"},{"title":"Generate Video (from First Frame and/or Text)","openapi":"openapi.yaml POST /v1/videos","href":"/v1/api-reference/videos/create-from-first-frame"},{"title":"Generate Video (from First-Last Frames and/or Text)","openapi":"openapi.yaml POST /v1/videos","href":"/v1/api-reference/videos/create-from-first-last-frame"},{"title":"Generate Video (from Reference Video/Image)","openapi":"openapi.yaml POST /v1/videos","href":"/v1/api-reference/videos/create-from-reference-video"},{"title":"Using Viggle-Remake","openapi":"openapi.yaml POST /v1/videos","href":"/v1/api-reference/videos/create-from-character-animation"},{"title":"Upscale Video (2x)","openapi":"openapi.yaml POST /v1/videos/super-resolution","href":"/v1/api-reference/videos/super-resolution"},{"title":"List Videos","openapi":"openapi.yaml GET /v1/videos","href":"/v1/api-reference/videos/list"},{"title":"Get Video","openapi":"openapi.yaml GET /v1/videos/{video_id}","description":"Retrieve the full state of a Render, generated video, or video upscale through one unified endpoint.","href":"/v1/api-reference/videos/get"}]},{"group":"Viggle Image","pages":[{"title":"Generate Image","openapi":"openapi.yaml POST /v1/images","href":"/v1/api-reference/images/create"},{"title":"Get Image","openapi":"openapi.yaml GET /v1/images/{image_id}","description":"Retrieve the current state of an image generation job, and its PNG download URLs once ready.","href":"/v1/api-reference/images/get"}]}]}]}],"global":{"anchors":[{"anchor":"Community","icon":"https://cdn.simpleicons.org/discord/white","href":"https://discord.com/invite/viggle"}]}},{"language":"zh","navbar":{"links":[{"href":"https://portal.viggle.ai/dashboard","label":"控制台"}],"primary":{"type":"button","label":"获取 API 密钥","href":"https://portal.viggle.ai/keys"}},"pages":[{"title":"zh","href":"/zh/v1/api-reference/images/create"}]}]},"basePath":"","title":"Generate Image - Viggle API","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js","Markdown-Dj-na-_-.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-DEBW87tT.js"]}