{"info":{"title":"Image Generation API","version":"1.0.0"},"paths":{"/predictions":{"post":{"summary":"Create Prediction","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionResponse"}}},"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}},"description":"Validation Error"}},"description":"Run a prediction with the model.","operationId":"create_prediction","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictionRequest"}}},"required":true}}}},"openapi":"3.0.2","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["prompt"],"properties":{"prompt":{"type":"string","title":"Prompt","description":"The text prompt to generate an image from."},"image_urls":{"type":"array","items":{"type":"string","format":"uri"},"title":"Image URLs","description":"Optional URLs of images to use as input."},"num_outputs":{"type":"integer","title":"Number of Outputs","default":1,"maximum":4,"minimum":1,"description":"The number of images to generate."},"output_format":{"allOf":[{"$ref":"#/components/schemas/output_format"}],"default":"png","description":"The desired format for the output images."}}},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output"},"Status":{"enum":["starting","processing","succeeded","failed","canceled"],"type":"string","title":"Status","description":"The status of the prediction."},"output_format":{"enum":["jpg","png"],"type":"string","title":"Output Format","description":"The desired format for the output images."},"ValidationError":{"type":"object","title":"ValidationError","required":["loc","msg","type"],"properties":{"loc":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}}},"PredictionRequest":{"type":"object","title":"PredictionRequest","properties":{"input":{"$ref":"#/components/schemas/Input"},"webhook":{"type":"string","title":"Webhook URL","format":"uri","description":"An optional URL to send a POST request to when the prediction is complete."}}},"PredictionResponse":{"type":"object","title":"PredictionResponse","properties":{"id":{"type":"string","title":"Prediction ID"},"logs":{"type":"string","title":"Logs","default":""},"error":{"type":"string","title":"Error","nullable":true},"input":{"$ref":"#/components/schemas/Input"},"output":{"$ref":"#/components/schemas/Output"},"status":{"$ref":"#/components/schemas/Status"},"created_at":{"type":"string","title":"Created At","format":"date-time"},"completed_at":{"type":"string","title":"Completed At","format":"date-time","nullable":true}}},"HTTPValidationError":{"type":"object","title":"HTTPValidationError","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail"}}}}}}