{"openapi":"3.1.0","info":{"title":"Sắc Nét API","version":"1.0.0","description":"AI image generation, image editing and Blender rendering, billed per hour per tool (25,000 VND/hour; gen up to 1,500 images/hour with batch jobs, no image cap; edit unlimited). Jobs are asynchronous: create, poll, then download via files[].downloadUrl. AI agents can use the MCP server at /mcp instead (x-mcp below). Error responses carry retryable/action hints; on action=buy_hour show actionUrl to the user, never purchase automatically."},"servers":[{"url":"https://sacnet.vn"}],"x-mcp":{"name":"sacnet","version":"1.0.0","url":"https://sacnet.vn/mcp","transport":"streamable-http","auth":"OAuth 2.1 (discovery via /.well-known/oauth-protected-resource) or Authorization: Bearer <API key>"},"security":[{"bearer":[]}],"paths":{"/api/jobs/gen":{"post":{"summary":"Generate 1-4 images from a prompt","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1-200 printable ASCII chars. Same key + same body within 24h replays the first response (header Idempotent-Replayed: true) instead of creating a new job.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenJobInput"}}}},"responses":{"202":{"description":"Job queued","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs/edit":{"post":{"summary":"Edit an image with a text instruction","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1-200 printable ASCII chars. Same key + same body within 24h replays the first response (header Idempotent-Replayed: true) instead of creating a new job.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditJobUrlInput"}},"multipart/form-data":{"schema":{"type":"object","required":["prompt","image"],"properties":{"prompt":{"type":"string","maxLength":2000},"seed":{"type":"integer","minimum":0},"metadata":{"type":"string","description":"JobMetadata as a JSON string"},"image":{"type":"string","format":"binary","description":"PNG/JPG/WEBP, max 10MB"}}}}}},"responses":{"202":{"description":"Job queued","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/video/tiers":{"get":{"summary":"Video plans: card, VRAM, hourly price, resolutions, durations","security":[],"responses":{"200":{"description":"Plans","content":{"application/json":{"schema":{"type":"object","properties":{"tiers":{"type":"array","items":{"$ref":"#/components/schemas/VideoTier"}}}}}}}}}},"/api/jobs/video":{"post":{"summary":"Create a video clip with audio from text, or from a first-frame image","description":"Runs on the hour of the chosen video plan (`video` or `video_pro`). Clips of one account run one at a time. Poll GET /api/jobs/{id}; the result file is video/mp4.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1-200 printable ASCII chars. Same key + same body within 24h replays the first response (header Idempotent-Replayed: true) instead of creating a new job.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobInput"}},"multipart/form-data":{"schema":{"type":"object","required":["prompt"],"properties":{"kind":{"type":"string","enum":["video","video_pro"]},"prompt":{"type":"string","maxLength":4000},"resolution":{"type":"string","enum":["480p","768p","1080p"]},"aspect":{"type":"string","enum":["16:9","9:16"]},"duration":{"type":"integer","enum":[5,10]},"seed":{"type":"integer","minimum":0},"image":{"type":"string","format":"binary","description":"First frame, PNG/JPG/WEBP, max 10MB"}}}}}},"responses":{"202":{"description":"Job queued","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs":{"get":{"summary":"List image and video jobs","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["gen","edit","video","video_pro"]}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Jobs","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/Job"}},"nextCursor":{"type":["string","null"]}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs/{id}":{"get":{"summary":"Get an image job (poll until status is terminal)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs/{id}/cancel":{"post":{"summary":"Cancel a queued or running image job","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Canceled","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/files/s/{token}":{"get":{"summary":"Download a result file by signed link (no auth, valid 24h)","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File bytes (image/png, video/mp4 or render output)"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/render/scenes":{"post":{"summary":"Upload a .blend scene (multipart field 'file')","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Same file already uploaded; existing scene returned"},"201":{"description":"Scene created"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List scenes","responses":{"200":{"description":"Scenes"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/render/estimate":{"post":{"summary":"Estimate render time and price for every card option","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sceneId","params"],"properties":{"sceneId":{"type":"string","format":"uuid"},"params":{"$ref":"#/components/schemas/RenderParams"}}}}}},"responses":{"200":{"description":"Options and remaining render seconds"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/render/jobs":{"post":{"summary":"Start a render","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"1-200 printable ASCII chars. Same key + same body within 24h replays the first response (header Idempotent-Replayed: true) instead of creating a new job.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sceneId","tier","params"],"properties":{"sceneId":{"type":"string","format":"uuid"},"tier":{"type":"string","enum":["rtx3090","rtx4090","rtx5090"]},"params":{"$ref":"#/components/schemas/RenderParams"},"metadata":{"$ref":"#/components/schemas/JobMetadata"}}}}}},"responses":{"202":{"description":"Render queued"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List render jobs","responses":{"200":{"description":"Render jobs"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/render/jobs/{id}":{"get":{"summary":"Render progress and output files (files[].downloadUrl)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Render job"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/render/jobs/{id}/cancel":{"post":{"summary":"Cancel a render that has not started","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Canceled"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/jobs/{id}/files/{index}/share":{"post":{"summary":"Create a public share page for one finished image (prompt not shown)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0,"maximum":3}}],"responses":{"201":{"description":"Share { id, url, imageUrl, width, height, createdAt }"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/shares/{id}":{"get":{"summary":"Public share metadata (no auth)","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Share"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Remove a share","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Removed"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/me/quota":{"get":{"summary":"Remaining time/quota per tool, free trial status and where to buy","responses":{"200":{"description":"Quota","content":{"application/json":{"schema":{"type":"object","properties":{"usage":{"type":"array","items":{"$ref":"#/components/schemas/Usage"}},"trial":{"$ref":"#/components/schemas/Trial"},"buyUrl":{"type":"string"}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/keys":{"get":{"summary":"List API keys","responses":{"200":{"description":"Keys"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an API key (token returned once). Grants free trial if linked with Google/GitHub (>= 30 days) and not yet claimed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100}}}}}},"responses":{"201":{"description":"Created: { key, token, trial }"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks":{"get":{"summary":"List webhook endpoints (secrets are never returned)","responses":{"200":{"description":"Endpoints","content":{"application/json":{"schema":{"type":"object","properties":{"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a webhook endpoint (max 3). The signing secret is returned only once.","description":"Deliveries follow Standard Webhooks: headers webhook-id (evt_…, stable across retries), webhook-timestamp (Unix seconds) and webhook-signature (`v1,<base64 HMAC-SHA256(base64-decoded secret after whsec_, id.timestamp.body)>`, space-separated when two secrets are valid). Body: {id, type, createdAt, data}. At-least-once and possibly out of order: dedupe by id. Non-2xx is retried after 1m, 5m, 30m, 2h, 6h, 12h, 24h; 410 disables the endpoint; 3 days of failures disables it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"secret":{"type":"string"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/{id}":{"patch":{"summary":"Change url, events, or enable/disable","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a webhook endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/{id}/rotate-secret":{"post":{"summary":"Issue a new secret; the old one keeps being signed alongside for 24h","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{ secret }"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/{id}/test":{"post":{"summary":"Send a `ping` event to this endpoint","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Queued"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/{id}/deliveries":{"get":{"summary":"Last 50 deliveries (type, status, HTTP status, attempts)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"{ deliveries }"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/webhooks/deliveries/{id}/retry":{"post":{"summary":"Send a delivery again now","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"202":{"description":"Queued"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/keys/{id}":{"delete":{"summary":"Revoke an API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key snr_… from the account page"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","examples":["NO_ACTIVE_PASS","RATE_LIMITED","VALIDATION"]},"message":{"type":"string","description":"Vietnamese, safe to show to the user"},"retryable":{"type":"boolean"},"action":{"type":"string","enum":["buy_hour","wait","retry","fix_input","authenticate"]},"actionUrl":{"type":"string"},"retryAfter":{"type":"integer","description":"Seconds"},"missingAssets":{"type":"array","description":"Only on SCENE_MISSING_ASSETS: files the .blend references but does not contain (unpacked textures, linked libraries, caches). Pack them in Blender and upload again.","items":{"type":"object","required":["kind","name","path"],"properties":{"kind":{"type":"string","enum":["image","library","volume","cache","movie","font"]},"name":{"type":"string"},"path":{"type":"string","description":"Path as stored in the file, e.g. //textures/wood.png"}}}}}}}},"GenJobInput":{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","maxLength":2000},"negative":{"type":"string","maxLength":2000},"width":{"type":"integer","default":1024,"description":"Square 768/896/1024/1152/1328, or 832x1216 / 1216x832"},"height":{"type":"integer","default":1024},"count":{"type":"integer","minimum":1,"maximum":4,"default":1},"seed":{"type":"integer","minimum":0},"metadata":{"$ref":"#/components/schemas/JobMetadata"}}},"EditJobUrlInput":{"type":"object","required":["imageUrl","prompt"],"properties":{"imageUrl":{"type":"string","description":"Public https URL; max 12MB, 3 redirects"},"prompt":{"type":"string","maxLength":2000},"seed":{"type":"integer","minimum":0},"metadata":{"$ref":"#/components/schemas/JobMetadata"}}},"VideoJobInput":{"type":"object","required":["prompt"],"properties":{"kind":{"type":"string","enum":["video","video_pro"],"default":"video"},"prompt":{"type":"string","maxLength":4000,"description":"Scene, motion, camera and sound"},"resolution":{"type":"string","enum":["480p","768p","1080p"],"default":"480p","description":"1080p needs video_pro"},"aspect":{"type":"string","enum":["16:9","9:16"],"default":"16:9"},"duration":{"type":"integer","enum":[5,10],"default":5,"description":"Seconds"},"seed":{"type":"integer","minimum":0},"imageUrl":{"type":"string","description":"First frame from a public https URL (image to video)"}}},"VideoTier":{"type":"object","properties":{"kind":{"type":"string","enum":["video","video_pro"]},"card":{"type":"string"},"vramGb":{"type":"integer"},"vndPerHour":{"type":"integer"},"enabled":{"type":"boolean"},"resolutions":{"type":"array","items":{"type":"string"}},"durations":{"type":"array","items":{"type":"integer"}},"secondsPer5s":{"type":"object","additionalProperties":{"type":["integer","null"]}},"secondsPer10s":{"type":"object","additionalProperties":{"type":["integer","null"]}}}},"Job":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["gen","edit","video","video_pro"]},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"]},"phase":{"type":["string","null"],"description":"Current execution phase while running, null otherwise"},"prompt":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/JobFile"}},"error":{"type":["string","null"]},"queuePosition":{"type":["integer","null"]},"waitEst":{"type":["integer","null"],"description":"Estimated seconds until start"},"metadata":{"$ref":"#/components/schemas/JobMetadata","description":"Echo of the metadata sent at creation, or null"},"createdAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"}}},"JobMetadata":{"type":["object","null"],"description":"Your own key/value data (max 10 keys, keys [A-Za-z0-9_.-]{1,40}, string values up to 200 chars), returned on the job and in webhooks","additionalProperties":{"type":"string","maxLength":200},"maxProperties":10},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["job.succeeded","job.failed","job.canceled","batch.completed","pass.ending","pass.ended","render.succeeded","render.failed","render.canceled","render.grace_started","*"]}},"enabled":{"type":"boolean"},"disabledReason":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"lastSuccessAt":{"type":["string","null"],"format":"date-time"},"failingSince":{"type":["string","null"],"format":"date-time"}}},"WebhookInput":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","description":"https only, must resolve to a public address"},"events":{"type":"array","items":{"type":"string","enum":["job.succeeded","job.failed","job.canceled","batch.completed","pass.ending","pass.ended","render.succeeded","render.failed","render.canceled","render.grace_started","*"]},"minItems":1}}},"JobFile":{"type":"object","properties":{"index":{"type":"integer"},"width":{"type":"integer"},"height":{"type":"integer"},"mime":{"type":"string","enum":["image/png","video/mp4"]},"bytes":{"type":["integer","null"]},"url":{"type":"string","description":"Needs auth"},"downloadUrl":{"type":"string","description":"Signed, no auth, valid 24h"}}},"RenderParams":{"type":"object","required":["frameStart","frameEnd","width","height","samples"],"properties":{"frameStart":{"type":"integer","minimum":0},"frameEnd":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":320,"maximum":3840},"height":{"type":"integer","minimum":320,"maximum":2160},"samples":{"type":"integer","minimum":1,"maximum":1024},"output":{"type":"string","enum":["png","exr","mp4"],"default":"png"},"fps":{"type":"integer","minimum":1,"maximum":60,"default":24},"preview":{"type":"boolean"}}},"Usage":{"type":"object","properties":{"kind":{"type":"string","enum":["gen","edit","render","video","video_pro"]},"active":{"type":"boolean"},"pending":{"type":"boolean","description":"Paid/trial time not started yet"},"used":{"type":"integer"},"limit":{"type":["integer","null"]},"windowEndsAt":{"type":["string","null"],"format":"date-time"},"source":{"type":["string","null"],"enum":["paid","trial",null]}}},"Trial":{"type":"object","properties":{"granted":{"type":"boolean"},"grantedAt":{"type":["string","null"],"format":"date-time"},"minutes":{"type":"integer"},"genImages":{"type":["integer","null"]},"renderSeconds":{"type":"integer"},"githubMinAgeDays":{"type":"integer"}}}}}}