{"openapi":"3.1.0","info":{"title":"MOSS Image API — CheaperGen","version":"1.0.0","description":"MOSS Image from OpenMOSS is an open-weights 5B text-to-image model that renders legible Chinese and English text and places text and objects where a JSON layout says, at 1K, 1.5K or 2K."},"servers":[{"url":"https://cheapergen.com/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Generation":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"generation"},"model":{"type":"string"},"endpoint":{"type":"string"},"status":{"enum":["queued","running","succeeded","failed","canceled"]},"output":{"type":["object","null"]},"error":{"type":["object","null"]},"cost":{"type":"object","properties":{"amount_usd":{"type":"number"},"official_usd":{"type":["number","null"],"description":"The list price for the same request: see list_price_source."},"list_price_source":{"enum":["official","reference"],"description":"official: the developer's own list price; reference: another price we compare with, named by list_price_label (e.g. fal API)."},"list_price_label":{"type":"string"},"saved_usd":{"type":["number","null"]},"estimated":{"type":"boolean"}}},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}}}},"paths":{"/run/openmoss/moss-image/text-to-image":{"post":{"summary":"MOSS Image — Text to Image","operationId":"openmoss_moss_image_text_to_image","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"prompt":{"title":"Prompt","description":"Natural language, comma-separated tags or a JSON layout (a scene caption plus items with text and bounding boxes, in pixels from the canvas centre). Put the exact words to render in quotes.","type":"string","maxLength":5000},"aspect_ratio":{"title":"Aspect ratio","description":"Output image shape. At 1K: 1:1 = 1024 × 1024, 4:5 = 912 × 1136, 5:4 = 1136 × 912, 3:4 = 880 × 1168, 4:3 = 1168 × 880, 2:3 = 832 × 1248, 3:2 = 1248 × 832, 9:16 = 768 × 1360, 16:9 = 1360 × 768, 1:2 = 720 × 1440, 2:1 = 1440 × 720, 9:21 = 656 × 1552, 21:9 = 1552 × 656, 1:3 = 576 × 1760, 3:1 = 1760 × 576.","type":"string","enum":["1:1","4:5","5:4","3:4","4:3","2:3","3:2","9:16","16:9","1:2","2:1","9:21","21:9","1:3","3:1"],"default":"1:1"},"resolution":{"title":"Resolution","description":"Output size, the same price at every aspect ratio: 1K = 1 MP (1024 × 1024), 1.5K ≈ 2.25 MP (1536 × 1536), 2K = 4 MP (2048 × 2048) at 1:1, with 1 MP = 1024² px. Other ratios keep the pixels: each side is the 1:1 side × √ratio, rounded down to a multiple of 16 (e.g. 2K 16:9 = 2720 × 1536).","type":"string","enum":["1K","1.5K","2K"],"default":"1K"},"seed":{"title":"Seed","description":"Use the same seed and settings to reproduce a result. Leave empty for random.","type":"integer","minimum":0,"maximum":2147483647},"enable_safety_checker":{"title":"Enable Safety Checker","description":"If set to true, the safety checker will be enabled. Content our Acceptable Use Policy prohibits stays blocked either way.","type":"boolean","default":true},"webhook_url":{"type":"string","format":"uri","title":"Webhook URL","description":"Optional. We POST the finished generation here (signed)."}},"additionalProperties":false}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"400":{"description":"Invalid request"},"402":{"description":"Insufficient balance"}}}},"/generations/{id}":{"get":{"summary":"Get a generation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}}}}}}}