{"openapi":"3.0.3","info":{"title":"DepthCarve Production API","version":"1.0.0","description":"Server-to-server relative depth maps. Use from a trusted backend with a hashed API key. The current call is synchronous; there is no webhook. Copy the returned image immediately because the URL is temporary. Idempotency is ledger-based (one debit per successful request, automatic refund on provider failure), not a client idempotency key."},"servers":[{"url":"https://depthcarve.com"}],"tags":[{"name":"Depth"},{"name":"Keys"},{"name":"Health"}],"paths":{"/api/health":{"get":{"operationId":"getHealth","tags":["Health"],"summary":"Service health","responses":{"200":{"description":"Worker and D1 are reachable."}}}},"/api/openapi.json":{"get":{"operationId":"getOpenApi","tags":["Health"],"summary":"OpenAPI document for the Production API","responses":{"200":{"description":"OpenAPI 3 document."}}}},"/api/v1/depth-map":{"post":{"operationId":"createDepthMap","tags":["Depth"],"summary":"Create a relative depth-map preview","security":[{"bearerAuth":[]}],"x-depthcarve-when-to-use":"Use when a trusted backend needs a visual depth preview. Do not use for certified metric distance, G-code, or unattended physical machining.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthMapInput"}}}},"responses":{"200":{"description":"Depth map URL. Copy the file immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepthMapSuccess"}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"402":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"},"502":{"$ref":"#/components/responses/ApiError"}}}},"/api/account/api-keys":{"get":{"operationId":"listApiKeys","tags":["Keys"],"summary":"List unrevoked API key prefixes","security":[{"cookieAuth":[]}],"responses":{"200":{"description":"Key metadata without secret material."},"401":{"$ref":"#/components/responses/ApiError"}}},"post":{"operationId":"createApiKey","tags":["Keys"],"summary":"Create an API key (shown once)","security":[{"cookieAuth":[]}],"responses":{"201":{"description":"Includes the secret once."},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"dc_live_","description":"Production API key. Never place it in a browser bundle."},"cookieAuth":{"type":"apiKey","in":"cookie","name":"dc_session"}},"schemas":{"DepthMapInput":{"type":"object","required":["imageDataUri"],"additionalProperties":false,"properties":{"imageDataUri":{"type":"string","minLength":100,"maxLength":1500000,"pattern":"^data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$","description":"Compressed PNG, JPEG, or WebP data URI under 1.5 MB."}}},"DepthMapSuccess":{"type":"object","required":["id","status","depthMapUrl"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["succeeded"]},"depthMapUrl":{"type":"string","format":"uri","description":"Temporary HTTPS image URL."}}},"ApiErrorBody":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"docs":{"type":"string","format":"uri"}}}}}},"responses":{"ApiError":{"description":"Typed error. docs points at the public contract page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}}