{"openapi":"3.1.0","info":{"title":"Meo Studio API","version":"1.0.0","description":"Generate AI images and videos with the top models. Same credits as the studio; failed generations are refunded automatically."},"servers":[{"url":"https://www.mymeo.app/v1"}],"security":[{"bearer":[]}],"paths":{"/account":{"get":{"summary":"Plan and credits","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models":{"get":{"summary":"List models","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["video","image"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}}}}}}}}},"/models/{id}":{"get":{"summary":"Get a model","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estimate":{"post":{"summary":"Estimate credits","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["model"],"properties":{"model":{"type":"string"},"params":{"type":"object"},"video_seconds":{"type":"number"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/templates":{"get":{"summary":"List templates","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["motion","clip"]}},{"name":"search","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/generations":{"get":{"summary":"List generations","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Generation"}},"has_more":{"type":"boolean"}}}}}}}},"post":{"summary":"Create a generation","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerationRequest"}}}},"responses":{"200":{"description":"Finished (when wait_seconds was set)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"202":{"description":"Accepted, still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations/{id}":{"get":{"summary":"Get a generation","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"wait","in":"query","schema":{"type":"integer","maximum":55},"description":"Long-poll up to this many seconds"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations/{id}/cancel":{"post":{"summary":"Cancel and refund","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads":{"post":{"summary":"Upload an image or video (raw body). Returns a URL to use as image_url / video_url.","requestBody":{"content":{"image/*":{},"video/*":{}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}}}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key from Account menu → API & MCP (meo_live_…)"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}}},"Account":{"type":"object","properties":{"email":{"type":"string"},"plan":{"type":"string"},"plan_until":{"type":"string"},"credits":{"type":"integer"}}},"Model":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"modes":{"type":"array","items":{"type":"string"}},"params":{"type":"array","items":{"type":"object"}},"pricing":{"type":"object"}}},"GenerationRequest":{"type":"object","properties":{"model":{"type":"string","example":"kling-3"},"prompt":{"type":"string"},"mode":{"type":"string","enum":["t2v","i2v","v2v","t2i","i2i"]},"params":{"type":"object","example":{"resolution":"720p","duration":5,"aspect_ratio":"16:9"}},"image_url":{"type":"string"},"image_urls":{"type":"array","items":{"type":"string"}},"video_url":{"type":"string"},"video_seconds":{"type":"number"},"template_id":{"type":"string"},"webhook_url":{"type":"string"},"wait_seconds":{"type":"integer","maximum":55}}},"Generation":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","processing","completed","failed","canceled"]},"model":{"type":"string"},"credits":{"type":"integer"},"refunded":{"type":"boolean"},"outputs":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"type":{"type":"string"}}}},"error":{"type":"string"},"created_at":{"type":"string"}}}}}}