{"openapi":"3.1.0","info":{"title":"Img2CAD API","summary":"Turn a photo of an object into an editable CAD model (STEP, STL, GLB).","description":"Authenticate with a personal API key from https://img2cad.app/app/ (Account, API keys) as `Authorization: Bearer i2c_...`. Upload a photo (POST /v1/photos), start a conversion (POST /v1/jobs), poll GET /v1/jobs/{job_id} every 20 to 30 seconds until status is `succeeded`, then download the files from GET /v1/jobs/{job_id}/artifacts. Each conversion uses one export from the account's plan or export packs; dimension edits (variants) are free. An MCP server for agents is at https://img2cad.app/api/mcp. Guide: https://img2cad.app/agents","version":"1.0.0"},"servers":[{"url":"https://img2cad.app/api"}],"paths":{"/v1/uploads":{"post":{"summary":"Create Upload","operationId":"create_upload_v1_uploads_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/uploads/{upload_id}/resume":{"post":{"summary":"Resume Upload","operationId":"resume_upload_v1_uploads__upload_id__resume_post","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/uploads/{upload_id}/content":{"put":{"summary":"Upload Content","operationId":"upload_content_v1_uploads__upload_id__content_put","parameters":[{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","title":"Upload Id"}},{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}},{"name":"Upload-Offset","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Upload-Offset"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/photos":{"post":{"summary":"Upload Photo","description":"Upload a whole photo in one request: the image bytes as the body\n(Content-Type image/jpeg, image/png or image/webp, up to 20 MB), or JSON\n{\"image_url\": \"https://...\"} for a public image the server downloads.\nAuthenticate with ``Authorization: Bearer``: an app session, an API key,\na connected app's token, or an upload link's token (``i2u_...``).\nReturns the ``upload_id`` for POST /jobs.","operationId":"upload_photo_v1_photos_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","required":["image_url"],"properties":{"image_url":{"type":"string","description":"Public http(s) link to the photo"}}}}}}}},"/v1/jobs":{"post":{"summary":"Create Job","operationId":"create_job_v1_jobs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Jobs","operationId":"list_jobs_v1_jobs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"},"title":"Response List Jobs V1 Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/refine":{"post":{"summary":"Refine Job","description":"Start a new version of a finished model with the user's note applied.\nUses one export like any conversion and is refunded if it fails.","operationId":"refine_job_v1_jobs__job_id__refine_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefineCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/parameters":{"get":{"summary":"Job Parameters","description":"The named dimensions of a finished model that can be edited.","operationId":"job_parameters_v1_jobs__job_id__parameters_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParametersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/variants":{"post":{"summary":"Create Variant","description":"Make a new version of a finished model with edited dimensions. Free\n(uses no export), limited per day, one at a time per account.","operationId":"create_variant_v1_jobs__job_id__variants_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel Job","operationId":"cancel_job_v1_jobs__job_id__delete","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/jobs/{job_id}/artifacts":{"get":{"summary":"Job Artifacts","operationId":"job_artifacts_v1_jobs__job_id__artifacts_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactResponse"},"title":"Response Job Artifacts V1 Jobs  Job Id  Artifacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/entitlements":{"get":{"summary":"Entitlements","operationId":"entitlements_v1_me_entitlements_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ArtifactResponse":{"properties":{"kind":{"type":"string","title":"Kind"},"download_url":{"type":"string","title":"Download Url"},"byte_size":{"type":"integer","title":"Byte Size"},"sha256":{"type":"string","title":"Sha256"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["kind","download_url","byte_size","sha256","expires_at"],"title":"ArtifactResponse"},"EntitlementResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"daily_limit":{"type":"integer","title":"Daily Limit"},"daily_used":{"type":"integer","title":"Daily Used"},"daily_remaining":{"type":"integer","title":"Daily Remaining"},"monthly_limit":{"type":"integer","title":"Monthly Limit"},"monthly_used":{"type":"integer","title":"Monthly Used"},"monthly_remaining":{"type":"integer","title":"Monthly Remaining"},"purchased_credits":{"type":"integer","title":"Purchased Credits"},"daily_resets_at":{"type":"string","format":"date-time","title":"Daily Resets At"},"cycle_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cycle Start"},"cycle_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cycle End"},"promo_preview_available":{"type":"boolean","title":"Promo Preview Available"},"promo_preview_used":{"type":"boolean","title":"Promo Preview Used"},"api_access":{"type":"boolean","title":"Api Access","default":false},"can_manage_billing":{"type":"boolean","title":"Can Manage Billing","default":false},"is_admin":{"type":"boolean","title":"Is Admin","default":false}},"type":"object","required":["plan","daily_limit","daily_used","daily_remaining","monthly_limit","monthly_used","monthly_remaining","purchased_credits","daily_resets_at","cycle_start","cycle_end","promo_preview_available","promo_preview_used"],"title":"EntitlementResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobCreate":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"object_label":{"anyOf":[{"type":"string","maxLength":160},{"type":"null"}],"title":"Object Label"},"dimension_hint_mm":{"anyOf":[{"type":"number","maximum":100000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Dimension Hint Mm"},"promo_preview":{"type":"boolean","title":"Promo Preview","default":false}},"type":"object","required":["upload_id"],"title":"JobCreate"},"JobResponse":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"progress":{"type":"integer","title":"Progress"},"stage":{"type":"string","title":"Stage"},"object_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Label"},"dimension_hint_mm":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dimension Hint Mm"},"quota_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quota Source"},"valid_step":{"type":"boolean","title":"Valid Step"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"parent_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Job Id"},"refine_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refine Note"},"refine_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refine Until"},"size_mm":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Size Mm"}},"type":"object","required":["id","status","progress","stage","object_label","dimension_hint_mm","quota_source","valid_step","error_code","created_at","updated_at","expires_at"],"title":"JobResponse"},"ParameterInfo":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"value":{"type":"number","title":"Value"},"unit":{"type":"string","enum":["mm","deg",""],"title":"Unit"},"integer":{"type":"boolean","title":"Integer"}},"type":"object","required":["name","label","value","unit","integer"],"title":"ParameterInfo"},"ParametersResponse":{"properties":{"editable":{"type":"boolean","title":"Editable"},"parameters":{"items":{"$ref":"#/components/schemas/ParameterInfo"},"type":"array","title":"Parameters"}},"type":"object","required":["editable","parameters"],"title":"ParametersResponse"},"PhotoResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"content_type":{"type":"string","title":"Content Type"},"byte_size":{"type":"integer","title":"Byte Size"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["upload_id","content_type","byte_size","expires_at"],"title":"PhotoResponse","description":"A photo received in one piece (POST /photos), ready for POST /jobs."},"RefineCreate":{"properties":{"note":{"type":"string","maxLength":500,"minLength":3,"title":"Note"}},"type":"object","required":["note"],"title":"RefineCreate"},"UploadCreate":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","enum":["image/jpeg","image/png","image/webp"],"title":"Content Type"},"byte_size":{"type":"integer","maximum":20971520.0,"exclusiveMinimum":0.0,"title":"Byte Size"},"sha256":{"type":"string","pattern":"^[a-fA-F0-9]{64}$","title":"Sha256"}},"type":"object","required":["filename","content_type","byte_size","sha256"],"title":"UploadCreate"},"UploadResponse":{"properties":{"upload_id":{"type":"string","title":"Upload Id"},"upload_url":{"type":"string","title":"Upload Url"},"method":{"type":"string","const":"PUT","title":"Method","default":"PUT"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"upload_offset":{"type":"integer","title":"Upload Offset","default":0}},"type":"object","required":["upload_id","upload_url","expires_at"],"title":"UploadResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VariantCreate":{"properties":{"values":{"additionalProperties":{"type":"number"},"type":"object","maxProperties":60,"minProperties":1,"title":"Values"}},"type":"object","required":["values"],"title":"VariantCreate"}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A personal API key (i2c_...)"}}},"security":[{"apiKey":[]}]}