{"openapi":"3.1.0","info":{"title":"Juice Platform API","version":"2026-10-15","description":"Design and build complete web pages from a brief. Create a generation, follow it from `pending` to `processing` to `completed` (poll it, or wait on the create call), then read the finished HTML and the images it uses, which the platform hosts. Guides: https://tryjuice.ai/platform/docs."},"externalDocs":{"description":"Juice Platform docs","url":"https://tryjuice.ai/platform/docs"},"servers":[{"url":"https://api.tryjuice.ai/v1"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Account","description":"The key behind a request, and the limits that apply to it."},{"name":"Models","description":"The models a generation can use."},{"name":"Generations","description":"Jobs that turn a brief into a page."},{"name":"Meta","description":"This document."}],"paths":{"/me":{"parameters":[{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"get":{"tags":["Account"],"operationId":"getMe","summary":"Describe the API key and its limits","responses":{"200":{"description":"The key, your active jobs, and the retention and wait limits.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/models":{"parameters":[{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"get":{"tags":["Models"],"operationId":"listModels","summary":"List the models","responses":{"200":{"description":"The models; `default: true` marks the one used when a request names none.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/generations":{"parameters":[{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"post":{"tags":["Generations"],"operationId":"createGeneration","summary":"Create a generation","description":"Queues a job that generates the page and its photographs. The answer always includes `artifacts` (null until the job completes). With `wait: \"completed\"` the request is held until the job ends or `wait_timeout_ms` passes, and a timeout answers 202 with the current state: poll GET /generations/{id}. Your pending and processing jobs are counted in GET /me. With `count` above 1 the request makes that many jobs from the brief and answers `{ object: \"list\", data: [...] }`, the jobs in order (a wait then waits for all of them); without it, or with 1, it answers the one generation.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGenerationRequest"}}}},"responses":{"200":{"description":"A replay: an earlier request with the same Idempotency-Key created this job (or these jobs, answered as that request was).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Generation"},{"$ref":"#/components/schemas/GenerationBatch"}]}}}},"201":{"description":"The job, created (and, with `wait: \"completed\"`, finished in time). With `count` above 1, the list of jobs.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Generation"},{"$ref":"#/components/schemas/GenerationBatch"}]}}}},"202":{"description":"`wait: \"completed\"` timed out; the job (or one of the jobs) is still running. Poll GET /generations/{id}.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Generation"},{"$ref":"#/components/schemas/GenerationBatch"}]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/InsufficientFunds"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"get":{"tags":["Generations"],"operationId":"listGenerations","summary":"List generations","parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":64},"description":"`next_cursor` from the previous page."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","processing","completed","failed","canceled","deleted"]},"description":"`pending` (waiting for a worker), `processing`, then `completed`, `failed` or `canceled`; `deleted` is the tombstone left by DELETE."},{"name":"source","in":"query","required":false,"schema":{"type":"string","enum":["api","mcp","playground"]},"description":"`api` for jobs created via the REST API; `mcp` for jobs created via the MCP server; `playground` for dashboard test runs."},{"name":"client_user_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":256},"description":"Only jobs created with this X-Client-User-Id."}],"responses":{"200":{"description":"Jobs without artifacts, newest first.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationList"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/generations/{id}":{"parameters":[{"$ref":"#/components/parameters/GenerationId"},{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"get":{"tags":["Generations"],"operationId":"getGeneration","summary":"Get a generation","parameters":[{"name":"include","in":"query","required":false,"schema":{"type":"string","maxLength":200},"description":"Comma-separated extras. `artifacts` adds the finished page and its images."}],"responses":{"200":{"description":"The job. A deleted job answers with its tombstone (`status: \"deleted\"`, no artifacts).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"tags":["Generations"],"operationId":"deleteGeneration","summary":"Delete a generation, its artifacts and its images","description":"Cancels the job if it is still running, deletes the page and the images, and keeps a tombstone. Deleting again returns the same tombstone.","responses":{"200":{"description":"The tombstone.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationDeleted"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/generations/{id}/html":{"parameters":[{"$ref":"#/components/parameters/GenerationId"},{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"get":{"tags":["Generations"],"operationId":"getGenerationHtml","summary":"Get the page as HTML","description":"The completed page as one HTML document, the same as `artifacts.html`, so it can be saved as is (`curl -o page.html`). Answers 409 GENERATION_NOT_COMPLETED while the job is pending or processing, and for a job that failed or was canceled.","responses":{"200":{"description":"The page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"text/html":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/NotCompleted"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/generations/{id}/share":{"parameters":[{"$ref":"#/components/parameters/GenerationId"},{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"post":{"tags":["Generations"],"operationId":"shareGeneration","summary":"Share the page with a public link","description":"Gives the completed page a public link with a name like \"Cooly Breeze 1822\" (https://designs.tryjuice.ai/cooly-breeze-1822): anyone with the link can open it, and it unfurls with a title and a preview picture in chat apps. A page is never shared unless you ask. Sharing a shared page returns its link with 200. The link works until the generation expires or is deleted, or you stop it (DELETE). Answers 409 GENERATION_NOT_COMPLETED for a job without a page.","responses":{"200":{"description":"It was already shared: the same link.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"201":{"description":"Shared now.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/NotCompleted"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"get":{"tags":["Generations"],"operationId":"getGenerationShare","summary":"Get the public link","description":"The live link, with how many times people opened it. 404 when the page is not shared.","responses":{"200":{"description":"The link.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"tags":["Generations"],"operationId":"unshareGeneration","summary":"Stop sharing","description":"The link stops working at once (within a minute for caches) and its name is never used again; sharing again makes a new link. 404 when the page is not shared.","responses":{"200":{"description":"The stopped link (`revoked_at` set).","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Share"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/generations/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/GenerationId"},{"$ref":"#/components/parameters/ClientRequestId"},{"$ref":"#/components/parameters/ClientUserId"}],"post":{"tags":["Generations"],"operationId":"cancelGeneration","summary":"Cancel a generation","description":"Stops a pending or processing job within a few seconds. A job that already ended is returned unchanged.","responses":{"200":{"description":"The job.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/openapi.json":{"get":{"tags":["Meta"],"operationId":"getOpenApi","summary":"This document","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document of this API.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"ms_live_...","description":"An API key from the Juice Platform dashboard: `Authorization: Bearer ms_live_...`."}},"parameters":{"ClientRequestId":{"name":"X-Request-Id","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Your id for this request, for example a UUID: visible ASCII without spaces. Recorded with the request and any job it creates, and used as our request id (echoed in the X-Request-Id response header and in errors)."},"ClientUserId":{"name":"X-Client-User-Id","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":256},"description":"An opaque id for your end user, for example a SHA-256 of their user id: visible ASCII without spaces. Recorded with the request and any job it creates, so usage can be broken down per end user."},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255},"description":"Repeating a create with the same key (from the same account) returns the original job (or jobs, with `count`) with 200 instead of creating more."},"GenerationId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^gen_[A-Za-z0-9_-]{24}$"},"description":"The generation id (`gen_...`)."}},"headers":{"RequestId":{"description":"Our id for the request: your X-Request-Id when it was valid, else one we generated. Quote it when asking for help.","schema":{"type":"string"}}},"responses":{"InvalidRequest":{"description":"INVALID_REQUEST: a field, query parameter or header is invalid; `details` says which.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"UNAUTHORIZED: the API key is missing, unknown, revoked or expired.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"PLATFORM_ACCESS_DISABLED: API access is turned off for this account. REQUEST_NOT_ALLOWED (creating a generation): the request is against our usage or content policy; (sharing): the page cannot be shared publicly.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"NOT_FOUND: no such generation for this account.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotCompleted":{"description":"GENERATION_NOT_COMPLETED: the job has no page: it is still running, or it failed or was canceled.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"PAYLOAD_TOO_LARGE: the request body exceeds 256 KiB.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InsufficientFunds":{"description":"INSUFFICIENT_FUNDS: the account needs a positive credit balance (and enough headroom across active in-flight generations within the overdraft limit) to start every generation asked for; none was created. `details` has `balance_usd`, `in_flight_designs`, `estimated_per_design_usd` and `billing_url`, where credits are added.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"TOO_MANY_REQUESTS: the account already has the maximum number of generations in flight (see `limits.max_active_jobs` on GET /me); wait for one to finish before starting more.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"INTERNAL_ERROR: something failed on our side. Retry with the same Idempotency-Key, or contact support with the request id.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"PLATFORM_UNAVAILABLE: the platform, or generation, is not available right now.","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED","PLATFORM_ACCESS_DISABLED","PLATFORM_UNAVAILABLE","INVALID_REQUEST","NOT_FOUND","GENERATION_NOT_COMPLETED","PAYLOAD_TOO_LARGE","REQUEST_NOT_ALLOWED","INSUFFICIENT_FUNDS","TOO_MANY_REQUESTS","INTERNAL_ERROR"]},"message":{"type":"string"},"request_id":{"type":"string","description":"Our id for the request (your X-Request-Id when you sent a valid one)."},"details":{"description":"`issues: [{ path, message }]` for invalid fields, `header` for a malformed header.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","request_id"]}},"required":["error"],"description":"Error codes: UNAUTHORIZED, PLATFORM_ACCESS_DISABLED, PLATFORM_UNAVAILABLE, INVALID_REQUEST, NOT_FOUND, GENERATION_NOT_COMPLETED, PAYLOAD_TOO_LARGE, REQUEST_NOT_ALLOWED, INSUFFICIENT_FUNDS, TOO_MANY_REQUESTS, INTERNAL_ERROR."},"Me":{"type":"object","properties":{"api_key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","prefix","created_at","last_used_at"]},"active_jobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Your pending plus processing jobs right now."},"limits":{"type":"object","properties":{"retention_days":{"type":"null","description":"Always null: jobs and their images are kept until you delete them."},"wait_timeout_max_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The longest `wait_timeout_ms` the server honors."},"max_active_jobs":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The most `pending` plus `processing` jobs your account can have in flight at once; null when uncapped."}},"required":["retention_days","wait_timeout_max_ms","max_active_jobs"]}},"required":["api_key","active_jobs","limits"]},"ModelList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"model"},"default":{"type":"boolean"},"name":{"type":"string"},"aliases":{"type":"array","items":{"type":"string"},"description":"Other ids that run this model. `juice-latest` is always an alias of the newest model."}},"required":["id","object","default","name","aliases"]}}},"required":["object","data"]},"CreateGenerationRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":32000,"description":"The brief: what to design, for whom, and anything it must include. 1 to 32,000 characters after trimming."},"model":{"description":"A model id or alias from GET /models. Defaults to the default model. `juice-latest` always runs the newest model; the job records the model that ran it.","type":"string","minLength":1,"maxLength":100,"enum":["juice-1","juice-latest"],"default":"juice-1"},"seed":{"description":"Sampling seed, for more repeatable runs.","type":"integer","minimum":0,"maximum":2147483647},"external_reference":{"description":"Your own identifier for this job, echoed back on it.","type":"string","maxLength":256},"images":{"description":"Up to 4 images that come with the brief, each an https URL or a data URL (data:image/png;base64,...): PNG, JPEG, WebP, GIF or AVIF, at most 20 MB. The model sees them; say in the prompt what they are for. Large images are best sent as URLs (the whole body is limited to 32 MiB).","maxItems":4,"type":"array","items":{"type":"string","minLength":1}},"reference_ids":{"description":"Up to 5 ids of your completed generations to build on, for example the previous page of a flow. The model sees each one's finished page and reads its HTML; say in the prompt what to keep.","maxItems":5,"type":"array","items":{"type":"string","pattern":"^gen_[A-Za-z0-9_-]{24}$"}},"count":{"default":1,"description":"How many generations to make from this brief, 1 to 4: separate jobs, each its own design. Above 1 the answer is a list of them (`data`), in order; with a `seed`, the jobs get seed, seed + 1, and so on.","type":"integer","minimum":1,"maximum":4},"wait":{"default":"none","description":"`none` answers at once; `completed` holds the request until the job ends or `wait_timeout_ms` passes.","type":"string","enum":["none","completed"]},"wait_timeout_ms":{"description":"Upper bound for `wait: \"completed\"`, default 20000; capped by the server (see GET /me). A timeout answers 202.","type":"integer","minimum":1000,"maximum":290000}},"required":["prompt"]},"Generation":{"type":"object","properties":{"id":{"type":"string","description":"`gen_` and 24 characters."},"object":{"type":"string","const":"generation"},"status":{"type":"string","enum":["pending","processing","completed","failed","canceled","deleted"],"description":"`pending` (waiting for a worker), `processing`, then `completed`, `failed` or `canceled`; `deleted` is the tombstone left by DELETE."},"source":{"type":"string","enum":["api","mcp","playground"],"description":"`api` for jobs created via the REST API; `mcp` for jobs created via the MCP server; `playground` for dashboard test runs."},"model":{"type":"string"},"prompt":{"type":"string","description":"Empty once the job is deleted."},"seed":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"external_reference":{"type":["string","null"]},"client_request_id":{"description":"The X-Request-Id sent when the job was created.","type":["string","null"]},"client_user_id":{"description":"The X-Client-User-Id sent when the job was created.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_type":{"type":"string"}},"required":["url","width","height","content_type"]},"description":"The images sent with the brief, as the model got them (PNG or JPEG, at most 2048 px on the long side), hosted until the job is deleted."},"reference_ids":{"type":"array","items":{"type":"string"},"description":"The earlier generations this one builds on."},"title":{"description":"The finished page's <title>.","type":["string","null"]},"share_url":{"description":"The page's public link once it was shared with POST /generations/{id}/share; null until then and after the share is stopped.","type":["string","null"]},"stages":{"type":"object","properties":{"page":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","skipped","failed"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finish_reason":{"type":["string","null"]}},"required":["status","started_at","completed_at","duration_ms","chars","finish_reason"],"description":"The HTML page is generated from the brief."},"images":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","skipped","failed"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"generated":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","started_at","completed_at","duration_ms","generated","total"],"description":"Generated photographs replace the page's placeholders. `skipped` when the server has no image generation."}},"required":["page","images"]},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"completion_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"images_generated":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["prompt_tokens","completion_tokens","images_generated"]},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"GENERATION_FAILED, CONTENT_FILTERED, EMPTY_OUTPUT, TIMEOUT, INTERRUPTED or INTERNAL_ERROR."},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}],"description":"Set when the job failed."},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"artifacts":{"description":"Present on POST answers and with `?include=artifacts`; null until the job completes.","anyOf":[{"type":"object","properties":{"html":{"description":"The finished page: one self-contained HTML document.","type":["string","null"]},"assets":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Public URL of the image. Stable until the job is deleted."},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alt":{"type":"string"},"content_type":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url","width","height","alt","content_type","bytes"]},"description":"The images the page uses."}},"required":["html","assets"]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"type":"null","description":"Always null: a job and its images are kept until you delete it."}},"required":["id","object","status","source","model","prompt","seed","external_reference","client_request_id","client_user_id","images","reference_ids","title","share_url","stages","usage","warnings","error","attempts","created_at","updated_at","started_at","completed_at","failed_at","canceled_at","deleted_at","expires_at"]},"GenerationList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"`gen_` and 24 characters."},"object":{"type":"string","const":"generation"},"status":{"type":"string","enum":["pending","processing","completed","failed","canceled","deleted"],"description":"`pending` (waiting for a worker), `processing`, then `completed`, `failed` or `canceled`; `deleted` is the tombstone left by DELETE."},"source":{"type":"string","enum":["api","mcp","playground"],"description":"`api` for jobs created via the REST API; `mcp` for jobs created via the MCP server; `playground` for dashboard test runs."},"model":{"type":"string"},"prompt":{"type":"string","description":"Empty once the job is deleted."},"seed":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"external_reference":{"type":["string","null"]},"client_request_id":{"description":"The X-Request-Id sent when the job was created.","type":["string","null"]},"client_user_id":{"description":"The X-Client-User-Id sent when the job was created.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_type":{"type":"string"}},"required":["url","width","height","content_type"]},"description":"The images sent with the brief, as the model got them (PNG or JPEG, at most 2048 px on the long side), hosted until the job is deleted."},"reference_ids":{"type":"array","items":{"type":"string"},"description":"The earlier generations this one builds on."},"title":{"description":"The finished page's <title>.","type":["string","null"]},"share_url":{"description":"The page's public link once it was shared with POST /generations/{id}/share; null until then and after the share is stopped.","type":["string","null"]},"stages":{"type":"object","properties":{"page":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","skipped","failed"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finish_reason":{"type":["string","null"]}},"required":["status","started_at","completed_at","duration_ms","chars","finish_reason"],"description":"The HTML page is generated from the brief."},"images":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","skipped","failed"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"generated":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","started_at","completed_at","duration_ms","generated","total"],"description":"Generated photographs replace the page's placeholders. `skipped` when the server has no image generation."}},"required":["page","images"]},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"completion_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"images_generated":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["prompt_tokens","completion_tokens","images_generated"]},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"GENERATION_FAILED, CONTENT_FILTERED, EMPTY_OUTPUT, TIMEOUT, INTERRUPTED or INTERNAL_ERROR."},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}],"description":"Set when the job failed."},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"artifacts":{"description":"Present on POST answers and with `?include=artifacts`; null until the job completes.","anyOf":[{"type":"object","properties":{"html":{"description":"The finished page: one self-contained HTML document.","type":["string","null"]},"assets":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Public URL of the image. Stable until the job is deleted."},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alt":{"type":"string"},"content_type":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url","width","height","alt","content_type","bytes"]},"description":"The images the page uses."}},"required":["html","assets"]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"type":"null","description":"Always null: a job and its images are kept until you delete it."}},"required":["id","object","status","source","model","prompt","seed","external_reference","client_request_id","client_user_id","images","reference_ids","title","share_url","stages","usage","warnings","error","attempts","created_at","updated_at","started_at","completed_at","failed_at","canceled_at","deleted_at","expires_at"]},"description":"Jobs without artifacts, newest first."},"next_cursor":{"description":"Pass as `cursor` for the next page; null on the last page.","type":["string","null"]}},"required":["object","data","next_cursor"]},"GenerationBatch":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"`gen_` and 24 characters."},"object":{"type":"string","const":"generation"},"status":{"type":"string","enum":["pending","processing","completed","failed","canceled","deleted"],"description":"`pending` (waiting for a worker), `processing`, then `completed`, `failed` or `canceled`; `deleted` is the tombstone left by DELETE."},"source":{"type":"string","enum":["api","mcp","playground"],"description":"`api` for jobs created via the REST API; `mcp` for jobs created via the MCP server; `playground` for dashboard test runs."},"model":{"type":"string"},"prompt":{"type":"string","description":"Empty once the job is deleted."},"seed":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"external_reference":{"type":["string","null"]},"client_request_id":{"description":"The X-Request-Id sent when the job was created.","type":["string","null"]},"client_user_id":{"description":"The X-Client-User-Id sent when the job was created.","type":["string","null"]},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_type":{"type":"string"}},"required":["url","width","height","content_type"]},"description":"The images sent with the brief, as the model got them (PNG or JPEG, at most 2048 px on the long side), hosted until the job is deleted."},"reference_ids":{"type":"array","items":{"type":"string"},"description":"The earlier generations this one builds on."},"title":{"description":"The finished page's <title>.","type":["string","null"]},"share_url":{"description":"The page's public link once it was shared with POST /generations/{id}/share; null until then and after the share is stopped.","type":["string","null"]},"stages":{"type":"object","properties":{"page":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","skipped","failed"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"chars":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"finish_reason":{"type":["string","null"]}},"required":["status","started_at","completed_at","duration_ms","chars","finish_reason"],"description":"The HTML page is generated from the brief."},"images":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","skipped","failed"]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"generated":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"total":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["status","started_at","completed_at","duration_ms","generated","total"],"description":"Generated photographs replace the page's placeholders. `skipped` when the server has no image generation."}},"required":["page","images"]},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"completion_tokens":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"images_generated":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["prompt_tokens","completion_tokens","images_generated"]},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"GENERATION_FAILED, CONTENT_FILTERED, EMPTY_OUTPUT, TIMEOUT, INTERRUPTED or INTERNAL_ERROR."},"message":{"type":"string"}},"required":["code","message"]},{"type":"null"}],"description":"Set when the job failed."},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"artifacts":{"description":"Present on POST answers and with `?include=artifacts`; null until the job completes.","anyOf":[{"type":"object","properties":{"html":{"description":"The finished page: one self-contained HTML document.","type":["string","null"]},"assets":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Public URL of the image. Stable until the job is deleted."},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"alt":{"type":"string"},"content_type":{"type":"string"},"bytes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url","width","height","alt","content_type","bytes"]},"description":"The images the page uses."}},"required":["html","assets"]},{"type":"null"}]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"canceled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"expires_at":{"type":"null","description":"Always null: a job and its images are kept until you delete it."}},"required":["id","object","status","source","model","prompt","seed","external_reference","client_request_id","client_user_id","images","reference_ids","title","share_url","stages","usage","warnings","error","attempts","created_at","updated_at","started_at","completed_at","failed_at","canceled_at","deleted_at","expires_at"]},"description":"The jobs the request made, in order, each with `artifacts` (null until it completes)."}},"required":["object","data"],"description":"The answer to a create with `count` above 1."},"GenerationDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"generation"},"status":{"type":"string","const":"deleted"},"deleted_at":{"type":"string","format":"date-time"}},"required":["id","object","status","deleted_at"]},"Share":{"type":"object","properties":{"object":{"type":"string","const":"share"},"generation_id":{"type":"string"},"name":{"type":"string","description":"The link's name, e.g. \"Cooly Breeze 1822\"."},"slug":{"type":"string","description":"The name as it is written in the URL, e.g. cooly-breeze-1822."},"url":{"type":"string","description":"The public page: anyone with the link can open it. It shows the finished page with a small \"Made with Juice\" mark, and unfurls with a title and a preview picture."},"preview_image_url":{"type":"string","description":"The link's 1200×630 preview picture."},"views":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times the page was opened by a person (link unfurlers and crawlers are not counted)."},"created_at":{"type":"string","format":"date-time"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When sharing was stopped (DELETE). A stopped name never works again; sharing again makes a new one."},"expires_at":{"type":"null","description":"Always null: the link works until sharing is stopped or the generation is deleted."}},"required":["object","generation_id","name","slug","url","preview_image_url","views","created_at","revoked_at","expires_at"]}}}}