{"openapi":"3.1.0","info":{"title":"RELTO API","version":"1.0.0","description":"Property intelligence API — renovation scope analysis, virtual staging, MLS compliance validation, and architectural constraint detection.","contact":{"name":"RELTO Engineering","url":"https://relto.app"}},"servers":[{"url":"https://relto.app","description":"Production"}],"security":[{"BearerAuth":[]}],"webhooks":{"staging.completed":{"post":{"summary":"staging.completed","security":[],"description":"A staging job finished and its result is available. Signed with HMAC-SHA256: X-RELTO-Signature = \"sha256=<lowercase hex digest>\" over \"<X-RELTO-Timestamp>.<raw request body>\". The webhook secret RELTO issues for your tenant, sent with your API key. The same secret signs both delivery paths; it is never shared with another tenant. Verify against the exact raw body bytes, compare in constant time, and reject a delivery whose X-RELTO-Timestamp is more than 5 minutes from your clock. Envelope: { id, event, jobId (staging.*) | batchId (batch.completed), tenantId, timestamp, data } — identical on both delivery paths.","parameters":[{"name":"X-RELTO-Signature","in":"header","required":true,"description":"sha256=<hex>: HMAC-SHA256 of \"<X-RELTO-Timestamp>.<raw body>\"","schema":{"type":"string"}},{"name":"X-RELTO-Timestamp","in":"header","required":true,"description":"ISO 8601 time the delivery was signed; equal to the body timestamp","schema":{"type":"string"}},{"name":"X-RELTO-Event","in":"header","required":true,"description":"Event type, e.g. staging.completed","schema":{"type":"string"}},{"name":"X-RELTO-Event-Id","in":"header","required":true,"description":"Stable id of this outcome, equal to the body id; the same on every retry, so dedupe on it","schema":{"type":"string"}},{"name":"X-RELTO-Job-Id","in":"header","required":false,"description":"Per-request callbackUrl only, on staging.* events","schema":{"type":"string"}},{"name":"X-RELTO-Batch-Id","in":"header","required":false,"description":"Per-request callbackUrl only, on batch.completed","schema":{"type":"string"}},{"name":"X-RELTO-Attempt","in":"header","required":false,"description":"Per-request callbackUrl only: 1, 2 or 3","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","event","jobId","tenantId","timestamp","data"],"properties":{"id":{"type":"string","description":"Stable event id; equals X-RELTO-Event-Id"},"event":{"type":"string","const":"staging.completed"},"jobId":{"type":"string"},"tenantId":{"type":"string"},"timestamp":{"type":"string","format":"date-time","description":"Equals X-RELTO-Timestamp; part of the signed string"},"data":{"type":"object","properties":{"jobId":{"description":"uuid"},"livemode":{"description":"boolean (false for an rlt_test_ key)"},"resultUrl":{"description":"string"},"originalPhotoUrl":{"description":"string | null"},"style":{"description":"string"},"roomType":{"description":"string"},"deliveryState":{"description":"string"},"deliveryReasonCode":{"description":"string"},"reltoGuaranteed":{"description":"boolean"},"requiresHumanApproval":{"description":"boolean"},"verification":{"description":"object | null"},"referenceId":{"description":"string | null"},"batchId":{"description":"string | null"},"partnerContext":{"description":"object | null"}}}}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery"}}}},"staging.failed":{"post":{"summary":"staging.failed","security":[],"description":"A staging job failed terminally or is being retried. Signed with HMAC-SHA256: X-RELTO-Signature = \"sha256=<lowercase hex digest>\" over \"<X-RELTO-Timestamp>.<raw request body>\". The webhook secret RELTO issues for your tenant, sent with your API key. The same secret signs both delivery paths; it is never shared with another tenant. Verify against the exact raw body bytes, compare in constant time, and reject a delivery whose X-RELTO-Timestamp is more than 5 minutes from your clock. Envelope: { id, event, jobId (staging.*) | batchId (batch.completed), tenantId, timestamp, data } — identical on both delivery paths.","parameters":[{"name":"X-RELTO-Signature","in":"header","required":true,"description":"sha256=<hex>: HMAC-SHA256 of \"<X-RELTO-Timestamp>.<raw body>\"","schema":{"type":"string"}},{"name":"X-RELTO-Timestamp","in":"header","required":true,"description":"ISO 8601 time the delivery was signed; equal to the body timestamp","schema":{"type":"string"}},{"name":"X-RELTO-Event","in":"header","required":true,"description":"Event type, e.g. staging.completed","schema":{"type":"string"}},{"name":"X-RELTO-Event-Id","in":"header","required":true,"description":"Stable id of this outcome, equal to the body id; the same on every retry, so dedupe on it","schema":{"type":"string"}},{"name":"X-RELTO-Job-Id","in":"header","required":false,"description":"Per-request callbackUrl only, on staging.* events","schema":{"type":"string"}},{"name":"X-RELTO-Batch-Id","in":"header","required":false,"description":"Per-request callbackUrl only, on batch.completed","schema":{"type":"string"}},{"name":"X-RELTO-Attempt","in":"header","required":false,"description":"Per-request callbackUrl only: 1, 2 or 3","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","event","jobId","tenantId","timestamp","data"],"properties":{"id":{"type":"string","description":"Stable event id; equals X-RELTO-Event-Id"},"event":{"type":"string","const":"staging.failed"},"jobId":{"type":"string"},"tenantId":{"type":"string"},"timestamp":{"type":"string","format":"date-time","description":"Equals X-RELTO-Timestamp; part of the signed string"},"data":{"type":"object","properties":{"jobId":{"description":"uuid"},"livemode":{"description":"boolean (false for an rlt_test_ key)"},"error":{"description":"string"},"retryable":{"description":"boolean (RELTO will retry on its own)"},"failure":{"description":"{ code, attribution, message, retrySamePhotoHelps }"},"referenceId":{"description":"string | null"},"batchId":{"description":"string | null"},"partnerContext":{"description":"object | null"}}}}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery"}}}},"batch.completed":{"post":{"summary":"batch.completed","security":[],"description":"Every job of a POST /api/v1/staging/batch batch has finished (done or failed). Sent once per batch, after the last job settles.. Signed with HMAC-SHA256: X-RELTO-Signature = \"sha256=<lowercase hex digest>\" over \"<X-RELTO-Timestamp>.<raw request body>\". The webhook secret RELTO issues for your tenant, sent with your API key. The same secret signs both delivery paths; it is never shared with another tenant. Verify against the exact raw body bytes, compare in constant time, and reject a delivery whose X-RELTO-Timestamp is more than 5 minutes from your clock. Envelope: { id, event, jobId (staging.*) | batchId (batch.completed), tenantId, timestamp, data } — identical on both delivery paths.","parameters":[{"name":"X-RELTO-Signature","in":"header","required":true,"description":"sha256=<hex>: HMAC-SHA256 of \"<X-RELTO-Timestamp>.<raw body>\"","schema":{"type":"string"}},{"name":"X-RELTO-Timestamp","in":"header","required":true,"description":"ISO 8601 time the delivery was signed; equal to the body timestamp","schema":{"type":"string"}},{"name":"X-RELTO-Event","in":"header","required":true,"description":"Event type, e.g. staging.completed","schema":{"type":"string"}},{"name":"X-RELTO-Event-Id","in":"header","required":true,"description":"Stable id of this outcome, equal to the body id; the same on every retry, so dedupe on it","schema":{"type":"string"}},{"name":"X-RELTO-Job-Id","in":"header","required":false,"description":"Per-request callbackUrl only, on staging.* events","schema":{"type":"string"}},{"name":"X-RELTO-Batch-Id","in":"header","required":false,"description":"Per-request callbackUrl only, on batch.completed","schema":{"type":"string"}},{"name":"X-RELTO-Attempt","in":"header","required":false,"description":"Per-request callbackUrl only: 1, 2 or 3","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["id","event","batchId","tenantId","timestamp","data"],"properties":{"id":{"type":"string","description":"Stable event id; equals X-RELTO-Event-Id"},"event":{"type":"string","const":"batch.completed"},"batchId":{"type":"string"},"tenantId":{"type":"string"},"timestamp":{"type":"string","format":"date-time","description":"Equals X-RELTO-Timestamp; part of the signed string"},"data":{"type":"object","properties":{"batchId":{"description":"string"},"livemode":{"description":"boolean (false for an rlt_test_ key)"},"totalItems":{"description":"number"},"done":{"description":"number"},"failed":{"description":"number"},"jobs":{"description":"[{ jobId, referenceId, status: done | failed, resultUrl | null, deliveryState | null, failureCode | null }]"}}}}}}}},"responses":{"200":{"description":"Any 2xx acknowledges the delivery"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"rlt_live_<key> | rlt_test_<key>","description":"API key for your workspace: a free test key created by a workspace owner or admin on the Integrations page, or a live key issued with the Enterprise plan. Format: Bearer rlt_live_<random>, or Bearer rlt_test_<random> for a test key. Each key carries a per-minute request limit (60 unless issued otherwise); exceeding it answers 429 with Retry-After. A test key is accepted only by POST and GET /api/v1/staging and /api/v1/staging/batch and by the read-only GET /api/v1/policy/boards endpoints; every other endpoint answers it with 401. Its jobs run the real queue, status endpoints and webhooks, reserve no credits and make no model call, and they report livemode: false."}},"schemas":{"ApiResponseMeta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}},"ErrorEnvelope":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}},"ScopeIntelligence":{"type":"object","required":["projectType","scopeClass","trades","materials","risks","permits","confidence","visualDelta"],"properties":{"projectType":{"type":"string","enum":["interior","exterior","landscape"]},"scopeClass":{"type":"string","enum":["cosmetic","moderate","transformational"]},"trades":{"type":"array","items":{"type":"object","required":["trade","scope","durationDays","sequencePriority"],"properties":{"trade":{"type":"string","example":"Plumbing"},"scope":{"type":"string","example":"Replace kitchen faucet and under-sink plumbing"},"durationDays":{"type":"string","example":"3-5 days"},"sequencePriority":{"type":"integer","example":2}}}},"materials":{"type":"array","items":{"type":"object","required":["element","material","condition","confidence","upgradePath"],"properties":{"element":{"type":"string","example":"countertops"},"material":{"type":"string","example":"Carrara marble"},"condition":{"type":"string","enum":["good","fair","poor","unknown"]},"confidence":{"type":"number","minimum":0,"maximum":1,"example":0.87},"upgradePath":{"type":"string","example":"quartz slab"}}}},"risks":{"type":"array","items":{"type":"object","required":["risk","severity","indicator","mitigation"],"properties":{"risk":{"type":"string","example":"Popcorn ceiling may contain asbestos"},"severity":{"type":"string","enum":["high","medium","low"]},"indicator":{"type":"string","example":"Textured ceiling pattern consistent with pre-1980 application"},"mitigation":{"type":"string","example":"Professional asbestos test before disturbance"}}}},"permits":{"type":"array","items":{"type":"object","required":["trigger","permitType","estimatedTimeline","requiredForTier"],"properties":{"trigger":{"type":"string","example":"Electrical panel upgrade"},"permitType":{"type":"string","example":"Electrical permit"},"estimatedTimeline":{"type":"string","example":"2-4 weeks"},"requiredForTier":{"type":"array","items":{"type":"string","enum":["tier1","tier2","tier3"]}}}}},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Overall scope confidence"},"visualDelta":{"type":"object","properties":{"deltaClass":{"type":"string","enum":["minimal","noticeable","substantial"]},"preservationRate":{"type":"number","minimum":0,"maximum":1}}},"truthfulness":{"type":"object","properties":{"state":{"type":"string","enum":["grounded","downgraded","contradictory_blocked","insufficient_evidence"],"description":"How reliable the scope assessment is"},"blockedClaims":{"type":"array","items":{"type":"string"}},"downgradeReasons":{"type":"array","items":{"type":"string"}},"explanation":{"type":"string","nullable":true},"confidence":{"type":"string","enum":["high","medium","low"]}}}}},"PricingResponse":{"type":"object","nullable":true,"properties":{"provider":{"type":"string","example":"relto-internal"},"providerVersion":{"type":"string","example":"1.0.0"},"computedAt":{"type":"string","format":"date-time"},"tradeCosts":{"type":"array","items":{"type":"object","properties":{"trade":{"type":"string"},"lowEstimate":{"type":"number"},"highEstimate":{"type":"number"},"display":{"type":"string","example":"$4K-$9K"}}}},"totalLow":{"type":"number","example":22000},"totalHigh":{"type":"number","example":45000},"totalDisplay":{"type":"string","example":"$22K-$45K"},"confidence":{"type":"string","enum":["high","medium","low"]},"attribution":{"type":"string"}}},"ResultProvenance":{"type":"object","required":["pipelineVersion","generatedAt","scopeSource"],"properties":{"pipelineVersion":{"type":"string","example":"2.0.0"},"generatedAt":{"type":"string","format":"date-time"},"scopeSource":{"type":"string","enum":["grounding-engine","legacy-tier-config"]},"pricingSource":{"type":"string","nullable":true},"pricingVersion":{"type":"string","nullable":true}}},"UnifiedRenovationResult":{"type":"object","required":["visual","scope","pricing","provenance"],"properties":{"visual":{"type":"object","properties":{"images":{"type":"array","items":{"type":"string"}},"changeSummary":{"type":"string","nullable":true}}},"scope":{"type":"object","required":["projectType","scopeClass","trades","materials","risks","permits","confidence","visualDelta"],"properties":{"projectType":{"type":"string","enum":["interior","exterior","landscape"]},"scopeClass":{"type":"string","enum":["cosmetic","moderate","transformational"]},"trades":{"type":"array","items":{"type":"object","required":["trade","scope","durationDays","sequencePriority"],"properties":{"trade":{"type":"string","example":"Plumbing"},"scope":{"type":"string","example":"Replace kitchen faucet and under-sink plumbing"},"durationDays":{"type":"string","example":"3-5 days"},"sequencePriority":{"type":"integer","example":2}}}},"materials":{"type":"array","items":{"type":"object","required":["element","material","condition","confidence","upgradePath"],"properties":{"element":{"type":"string","example":"countertops"},"material":{"type":"string","example":"Carrara marble"},"condition":{"type":"string","enum":["good","fair","poor","unknown"]},"confidence":{"type":"number","minimum":0,"maximum":1,"example":0.87},"upgradePath":{"type":"string","example":"quartz slab"}}}},"risks":{"type":"array","items":{"type":"object","required":["risk","severity","indicator","mitigation"],"properties":{"risk":{"type":"string","example":"Popcorn ceiling may contain asbestos"},"severity":{"type":"string","enum":["high","medium","low"]},"indicator":{"type":"string","example":"Textured ceiling pattern consistent with pre-1980 application"},"mitigation":{"type":"string","example":"Professional asbestos test before disturbance"}}}},"permits":{"type":"array","items":{"type":"object","required":["trigger","permitType","estimatedTimeline","requiredForTier"],"properties":{"trigger":{"type":"string","example":"Electrical panel upgrade"},"permitType":{"type":"string","example":"Electrical permit"},"estimatedTimeline":{"type":"string","example":"2-4 weeks"},"requiredForTier":{"type":"array","items":{"type":"string","enum":["tier1","tier2","tier3"]}}}}},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"Overall scope confidence"},"visualDelta":{"type":"object","properties":{"deltaClass":{"type":"string","enum":["minimal","noticeable","substantial"]},"preservationRate":{"type":"number","minimum":0,"maximum":1}}},"truthfulness":{"type":"object","properties":{"state":{"type":"string","enum":["grounded","downgraded","contradictory_blocked","insufficient_evidence"],"description":"How reliable the scope assessment is"},"blockedClaims":{"type":"array","items":{"type":"string"}},"downgradeReasons":{"type":"array","items":{"type":"string"}},"explanation":{"type":"string","nullable":true},"confidence":{"type":"string","enum":["high","medium","low"]}}}}},"pricing":{"type":"object","nullable":true,"properties":{"provider":{"type":"string","example":"relto-internal"},"providerVersion":{"type":"string","example":"1.0.0"},"computedAt":{"type":"string","format":"date-time"},"tradeCosts":{"type":"array","items":{"type":"object","properties":{"trade":{"type":"string"},"lowEstimate":{"type":"number"},"highEstimate":{"type":"number"},"display":{"type":"string","example":"$4K-$9K"}}}},"totalLow":{"type":"number","example":22000},"totalHigh":{"type":"number","example":45000},"totalDisplay":{"type":"string","example":"$22K-$45K"},"confidence":{"type":"string","enum":["high","medium","low"]},"attribution":{"type":"string"}}},"provenance":{"type":"object","required":["pipelineVersion","generatedAt","scopeSource"],"properties":{"pipelineVersion":{"type":"string","example":"2.0.0"},"generatedAt":{"type":"string","format":"date-time"},"scopeSource":{"type":"string","enum":["grounding-engine","legacy-tier-config"]},"pricingSource":{"type":"string","nullable":true},"pricingVersion":{"type":"string","nullable":true}}}}},"TradeScope":{"type":"object","required":["trade","scope","durationDays","sequencePriority"],"properties":{"trade":{"type":"string","example":"Plumbing"},"scope":{"type":"string","example":"Replace kitchen faucet and under-sink plumbing"},"durationDays":{"type":"string","example":"3-5 days"},"sequencePriority":{"type":"integer","example":2}}},"DetectedMaterial":{"type":"object","required":["element","material","condition","confidence","upgradePath"],"properties":{"element":{"type":"string","example":"countertops"},"material":{"type":"string","example":"Carrara marble"},"condition":{"type":"string","enum":["good","fair","poor","unknown"]},"confidence":{"type":"number","minimum":0,"maximum":1,"example":0.87},"upgradePath":{"type":"string","example":"quartz slab"}}},"DetectedRisk":{"type":"object","required":["risk","severity","indicator","mitigation"],"properties":{"risk":{"type":"string","example":"Popcorn ceiling may contain asbestos"},"severity":{"type":"string","enum":["high","medium","low"]},"indicator":{"type":"string","example":"Textured ceiling pattern consistent with pre-1980 application"},"mitigation":{"type":"string","example":"Professional asbestos test before disturbance"}}},"DetectedPermit":{"type":"object","required":["trigger","permitType","estimatedTimeline","requiredForTier"],"properties":{"trigger":{"type":"string","example":"Electrical panel upgrade"},"permitType":{"type":"string","example":"Electrical permit"},"estimatedTimeline":{"type":"string","example":"2-4 weeks"},"requiredForTier":{"type":"array","items":{"type":"string","enum":["tier1","tier2","tier3"]}}}}}},"paths":{"/api/v1/staging":{"post":{"operationId":"submitStagingJob","summary":"Submit a virtual staging job","tags":["Virtual Staging"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64 data URL or public https image URL. Bodies over about 4.5 MB are rejected with 413 before the API runs, so prefer the URL form for large photos."},"style":{"type":"string","default":"Modern Minimalist","enum":["Modern Minimalist","Cozy Traditional","Luxury Elegant","Scandinavian","Industrial Modern","Coastal Beachy","Industrial","Mid-Century Modern","Contemporary","Traditional","Farmhouse","Coastal","Bohemian","Art Deco","Japandi","Transitional","Mediterranean","French Country","Rustic","Luxury","Urban Modern","Eclectic"]},"roomType":{"type":"string","default":"living-room","enum":["living-room","bedroom","kitchen","bathroom","dining-room","home-office","office","nursery","studio","outdoor-patio","general"]},"skipWatermark":{"type":"boolean","default":false,"description":"Honoured only when boardKey names a known MLS board outside California. Without a boardKey, with an unrecognised one, or with a California board the label and original-photo link stay on the image (AB 723)."},"boardKey":{"type":"string","pattern":"^[a-z0-9_]{1,40}$","description":"Listing's MLS board key (e.g. 'bright'). A board whose rules bar text on listing photos gets an unlabelled image, and the response's disclosure carries the remarks statement to use instead. Unknown keys keep the generic on-image label."},"stagingNotes":{"type":"string","maxLength":300,"description":"Optional furnishing preferences, e.g. 'navy sectional, no rug, desk in the corner'. Steers furniture and decor only: requests to change walls, paint, flooring, windows, doors or fixtures are ignored, because staging leaves the property as photographed."},"callbackUrl":{"type":"string","format":"uri","description":"Called once per job outcome (staging.completed / staging.failed), signed per /developers. Three attempts, 3 s each, about 0.5 s then 1.5 s apart; a timeout, 5xx, 408 or 429 is retried, any other 4xx is not. After the last attempt the event is parked and not redelivered automatically — poll GET /api/v1/staging?jobId= for any job you have not heard about."},"idempotencyKey":{"type":"string","maxLength":128},"referenceId":{"type":"string","maxLength":128,"description":"Your result correlation id; echoed in the accepted response"},"partnerContext":{"type":"object","additionalProperties":false,"description":"Optional vendor-neutral external identity and listing metadata","properties":{"externalUserId":{"type":"string","maxLength":200},"externalOrganizationId":{"type":"string","maxLength":200},"externalListingId":{"type":"string","maxLength":200},"externalMediaId":{"type":"string","maxLength":200},"sourceSystem":{"type":"string","maxLength":100},"compliancePolicyId":{"type":"string","maxLength":100},"listingMetadata":{"type":"object","maxProperties":50,"additionalProperties":true}}}}}}}},"responses":{"202":{"description":"Job queued","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"estimatedProcessingTime":{"type":"string","example":"105s","description":"Whole seconds, derived from queue depth and worker concurrency. A hint for polling cadence, not a delivery promise."},"livemode":{"type":"boolean","description":"false for a job submitted with an rlt_test_ key, which reserves no credits and makes no model call; true otherwise."},"isDuplicate":{"type":"boolean"},"referenceId":{"type":"string","nullable":true},"disclosure":{"type":"object","required":["policyId","imageLabelPermitted","remarksText","note"],"properties":{"policyId":{"type":"string","example":"bright_mls"},"imageLabelPermitted":{"type":"boolean","description":"False when the board's rules bar an on-image label; the image is delivered without one."},"remarksText":{"type":["string","null"],"description":"Statement to place in the listing remarks, when the board requires one."},"note":{"type":["string","null"]}}}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"API key lacks the staging:write scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"413":{"description":"Request body over about 4.5 MB. Plain text from the hosting platform, no JSON envelope, nothing charged. Send large photos as a public https image URL instead of base64.","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"503":{"description":"Queue saturated or a dependency unavailable. Retryable; nothing was charged. Backpressure responses carry a Retry-After header.","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}},"get":{"operationId":"getStagingJobStatus","summary":"Get staging job status and result","tags":["Virtual Staging"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"jobId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Job status (discriminated union by status field)","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"oneOf":[{"type":"object","required":["jobId","status","style","roomType","createdAt"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}}}},{"type":"object","required":["jobId","status","style","roomType","createdAt","startedAt"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"processing"},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time","nullable":true},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}}}},{"type":"object","required":["jobId","status","style","roomType","createdAt","resultUrl"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"done","description":"Processing completed. This does NOT mean the image is cleared for publication. Check requiresHumanApproval: if true, you must review the image before publishing. See deliveryState for details."},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"resultUrl":{"type":"string","format":"uri","description":"The staged image URL. RELTO_GUARANTEED and REQUIRES_APPROVAL results are delivered and billed for live keys (rlt_live_*). BLOCKED results fail and are refunded. Test keys (rlt_test_*) are never billed. Review before publishing if requiresHumanApproval is true."},"completedAt":{"type":"string","format":"date-time","nullable":true},"originalPhotoUrl":{"type":"string","format":"uri","nullable":true,"description":"Public link to the unaltered original (https://relto.app/o/<slug>), the same link the QR badge on the result resolves to; California AB 723 requires it beside the altered image. null when the original could not be hosted and the result carries no badge."},"deliveryState":{"type":"string","enum":["RELTO_GUARANTEED","REQUIRES_APPROVAL","MANUALLY_APPROVED"],"nullable":true,"description":"Delivery classification. null = not classified (legacy jobs or renovation jobs). RELTO_GUARANTEED: passed all structural and compliance checks; you remain responsible for reviewing and publishing. REQUIRES_APPROVAL: image generated and delivered, but needs human review before publication. MANUALLY_APPROVED: was REQUIRES_APPROVAL, then approved by human review. (BLOCKED jobs are remapped to status: \"failed\" and not returned here.)"},"deliveryReasonCode":{"type":"string","nullable":true,"description":"Why deliveryState was assigned. Code names the check that decided: clean_pass, fidelity_failed, structural_element_altered, etc. See API docs for details."},"reltoGuaranteed":{"type":"boolean","nullable":true,"description":"Convenience flag: true iff deliveryState is RELTO_GUARANTEED (passed all automated checks). Responsibility for reviewing and publishing remains with the partner."},"requiresHumanApproval":{"type":"boolean","nullable":true,"description":"Convenience flag: true iff deliveryState is REQUIRES_APPROVAL. Image is delivered and billed for live keys (rlt_live_*); test keys (rlt_test_*) are never billed. Automated verification was inconclusive. Partner must review before publication."},"verification":{"type":"object","nullable":true,"description":"Structural verification summary: state (verified/review_required/approved_by_review/blocked/unverified), headline, and per-category evidence lines. Does not include per-element records (those are returned only by GET /api/v1/staging/{jobId}/verification). null when the job predates verification or its record has expired."},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}}}},{"type":"object","required":["jobId","status","style","roomType","createdAt","failureReason","retryable","failure"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"failed"},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"failureReason":{"type":"string"},"retryable":{"type":"boolean"},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}},"failure":{"nullable":true,"type":"object","description":"Why the render failed. `attribution` says whose problem it is: photo (the input cannot be staged as supplied), quality (our preservation or delivery checks withheld it), service (ours), policy (the model provider refused the input). `retrySamePhotoHelps` is a claim about the input and is NOT the same as `retryable`, which is the queue scheduling decision — a job can be retryable while the same photo fails identically every time. null when the job predates classification.","required":["code","attribution","title","explanation","fixes","retrySamePhotoHelps"],"properties":{"code":{"type":"string"},"attribution":{"type":"string","enum":["photo","quality","service","policy"]},"title":{"type":"string"},"explanation":{"type":"string"},"fixes":{"type":"array","items":{"type":"string"}},"retrySamePhotoHelps":{"type":"boolean"}}}}}],"discriminator":{"propertyName":"status"}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"jobId query parameter missing","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"API key lacks the staging:read scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"404":{"description":"Job not found, or it belongs to another tenant","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/staging/batch":{"post":{"operationId":"submitStagingBatch","summary":"Submit up to 50 staging jobs in one request","tags":["Virtual Staging"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["image"],"properties":{"image":{"type":"string","description":"Base64 data URL or https URL"},"style":{"type":"string","default":"Modern Minimalist","enum":["Modern Minimalist","Cozy Traditional","Luxury Elegant","Scandinavian","Industrial Modern","Coastal Beachy","Industrial","Mid-Century Modern","Contemporary","Traditional","Farmhouse","Coastal","Bohemian","Art Deco","Japandi","Transitional","Mediterranean","French Country","Rustic","Luxury","Urban Modern","Eclectic"]},"roomType":{"type":"string","default":"living-room","enum":["living-room","bedroom","kitchen","bathroom","dining-room","home-office","office","nursery","studio","outdoor-patio","general"]},"skipWatermark":{"type":"boolean","default":false,"description":"Honoured only when boardKey names a known MLS board outside California. Without a boardKey, with an unrecognised one, or with a California board the label and original-photo link stay on the image (AB 723)."},"boardKey":{"type":"string","pattern":"^[a-z0-9_]{1,40}$","description":"Listing's MLS board key (e.g. 'bright'). A board whose rules bar text on listing photos gets an unlabelled image, and the response's disclosure carries the remarks statement to use instead. Unknown keys keep the generic on-image label."},"stagingNotes":{"type":"string","maxLength":300,"description":"Optional furnishing preferences, e.g. 'navy sectional, no rug, desk in the corner'. Steers furniture and decor only: requests to change walls, paint, flooring, windows, doors or fixtures are ignored, because staging leaves the property as photographed."},"referenceId":{"type":"string","maxLength":128,"description":"Your own id for this photo; echoed on batch status"},"partnerContext":{"type":"object","description":"Vendor-neutral external identity/listing metadata","additionalProperties":false,"properties":{"externalUserId":{"type":"string","maxLength":200},"externalOrganizationId":{"type":"string","maxLength":200},"externalListingId":{"type":"string","maxLength":200},"externalMediaId":{"type":"string","maxLength":200},"sourceSystem":{"type":"string","maxLength":100},"compliancePolicyId":{"type":"string","maxLength":100},"listingMetadata":{"type":"object","maxProperties":50,"additionalProperties":true}}}}}},"callbackUrl":{"type":"string","format":"uri","description":"Called once per job in the batch, then once with batch.completed after the last job settles. Called once per job outcome (staging.completed / staging.failed), signed per /developers. Three attempts, 3 s each, about 0.5 s then 1.5 s apart; a timeout, 5xx, 408 or 429 is retried, any other 4xx is not. After the last attempt the event is parked and not redelivered automatically — poll GET /api/v1/staging?jobId= for any job you have not heard about."},"idempotencyKey":{"type":"string","maxLength":128}}}}}},"responses":{"202":{"description":"Batch queued. Items that could not be enqueued are reported as failed and not charged.","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","required":["batchId","totalItems","queuedCount","failedCount","jobs"],"properties":{"batchId":{"type":"string","format":"uuid"},"totalItems":{"type":"integer"},"queuedCount":{"type":"integer"},"failedCount":{"type":"integer"},"jobs":{"type":"array","items":{"type":"object","required":["jobId","status"],"properties":{"jobId":{"type":"string","format":"uuid"},"referenceId":{"type":"string"},"status":{"type":"string","enum":["queued","failed"]},"disclosure":{"type":"object","required":["policyId","imageLabelPermitted","remarksText","note"],"properties":{"policyId":{"type":"string","example":"bright_mls"},"imageLabelPermitted":{"type":"boolean","description":"False when the board's rules bar an on-image label; the image is delivered without one."},"remarksText":{"type":["string","null"],"description":"Statement to place in the listing remarks, when the board requires one."},"note":{"type":["string","null"]}}}}}},"estimatedProcessingTime":{"type":"string","description":"Whole seconds for the whole batch, derived from queue depth and worker concurrency; a hint, not a promise. A 50-item batch is on the order of twenty minutes."},"livemode":{"type":"boolean","description":"false for a job submitted with an rlt_test_ key, which reserves no credits and makes no model call; true otherwise."},"isDuplicate":{"type":"boolean"},"disclosures":{"type":"array","description":"On an idempotent replay (isDuplicate), each item's disclosure in request order.","items":{"type":"object","required":["policyId","imageLabelPermitted","remarksText","note"],"properties":{"policyId":{"type":"string","example":"bright_mls"},"imageLabelPermitted":{"type":"boolean","description":"False when the board's rules bar an on-image label; the image is delivered without one."},"remarksText":{"type":["string","null"],"description":"Statement to place in the listing remarks, when the board requires one."},"note":{"type":["string","null"]}}}}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"Validation error (any invalid item rejects the whole batch)","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"402":{"description":"Insufficient credits for the whole batch","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"API key lacks the staging:write scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"413":{"description":"Request body over about 4.5 MB. Plain text from the hosting platform, no JSON envelope, nothing charged. Send large photos as a public https image URL instead of base64.","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"503":{"description":"Queue saturated or a dependency unavailable; retryable, nothing charged","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}},"get":{"operationId":"getStagingBatchStatus","summary":"Status of every job in a batch","description":"Poll one URL for the whole batch. The batch is settled when `pending` is 0. Each entry carries the same job shape as GET /api/v1/staging.","tags":["Virtual Staging"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"batchId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Batch status","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","required":["batchId","totalItems","pending","done","failed","jobs"],"properties":{"batchId":{"type":"string","format":"uuid"},"totalItems":{"type":"integer"},"pending":{"type":"integer","description":"Jobs still queued or processing"},"done":{"type":"integer"},"failed":{"type":"integer"},"jobs":{"type":"array","items":{"type":"object","required":["referenceId","job"],"properties":{"referenceId":{"type":"string","nullable":true},"job":{"oneOf":[{"type":"object","required":["jobId","status","style","roomType","createdAt"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"queued"},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}}}},{"type":"object","required":["jobId","status","style","roomType","createdAt","startedAt"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"processing"},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time","nullable":true},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}}}},{"type":"object","required":["jobId","status","style","roomType","createdAt","resultUrl"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"done","description":"Processing completed. This does NOT mean the image is cleared for publication. Check requiresHumanApproval: if true, you must review the image before publishing. See deliveryState for details."},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"resultUrl":{"type":"string","format":"uri","description":"The staged image URL. RELTO_GUARANTEED and REQUIRES_APPROVAL results are delivered and billed for live keys (rlt_live_*). BLOCKED results fail and are refunded. Test keys (rlt_test_*) are never billed. Review before publishing if requiresHumanApproval is true."},"completedAt":{"type":"string","format":"date-time","nullable":true},"originalPhotoUrl":{"type":"string","format":"uri","nullable":true,"description":"Public link to the unaltered original (https://relto.app/o/<slug>), the same link the QR badge on the result resolves to; California AB 723 requires it beside the altered image. null when the original could not be hosted and the result carries no badge."},"deliveryState":{"type":"string","enum":["RELTO_GUARANTEED","REQUIRES_APPROVAL","MANUALLY_APPROVED"],"nullable":true,"description":"Delivery classification. null = not classified (legacy jobs or renovation jobs). RELTO_GUARANTEED: passed all structural and compliance checks; you remain responsible for reviewing and publishing. REQUIRES_APPROVAL: image generated and delivered, but needs human review before publication. MANUALLY_APPROVED: was REQUIRES_APPROVAL, then approved by human review. (BLOCKED jobs are remapped to status: \"failed\" and not returned here.)"},"deliveryReasonCode":{"type":"string","nullable":true,"description":"Why deliveryState was assigned. Code names the check that decided: clean_pass, fidelity_failed, structural_element_altered, etc. See API docs for details."},"reltoGuaranteed":{"type":"boolean","nullable":true,"description":"Convenience flag: true iff deliveryState is RELTO_GUARANTEED (passed all automated checks). Responsibility for reviewing and publishing remains with the partner."},"requiresHumanApproval":{"type":"boolean","nullable":true,"description":"Convenience flag: true iff deliveryState is REQUIRES_APPROVAL. Image is delivered and billed for live keys (rlt_live_*); test keys (rlt_test_*) are never billed. Automated verification was inconclusive. Partner must review before publication."},"verification":{"type":"object","nullable":true,"description":"Structural verification summary: state (verified/review_required/approved_by_review/blocked/unverified), headline, and per-category evidence lines. Does not include per-element records (those are returned only by GET /api/v1/staging/{jobId}/verification). null when the job predates verification or its record has expired."},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}}}},{"type":"object","required":["jobId","status","style","roomType","createdAt","failureReason","retryable","failure"],"properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","const":"failed"},"style":{"type":"string"},"roomType":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"failureReason":{"type":"string"},"retryable":{"type":"boolean"},"referenceId":{"type":"string","nullable":true},"partnerContext":{"type":"object","nullable":true,"additionalProperties":false,"properties":{"externalUserId":{"type":"string"},"externalOrganizationId":{"type":"string"},"externalListingId":{"type":"string"},"externalMediaId":{"type":"string"},"sourceSystem":{"type":"string"},"compliancePolicyId":{"type":"string"},"listingMetadata":{"type":"object","additionalProperties":true}}},"failure":{"nullable":true,"type":"object","description":"Why the render failed. `attribution` says whose problem it is: photo (the input cannot be staged as supplied), quality (our preservation or delivery checks withheld it), service (ours), policy (the model provider refused the input). `retrySamePhotoHelps` is a claim about the input and is NOT the same as `retryable`, which is the queue scheduling decision — a job can be retryable while the same photo fails identically every time. null when the job predates classification.","required":["code","attribution","title","explanation","fixes","retrySamePhotoHelps"],"properties":{"code":{"type":"string"},"attribution":{"type":"string","enum":["photo","quality","service","policy"]},"title":{"type":"string"},"explanation":{"type":"string"},"fixes":{"type":"array","items":{"type":"string"}},"retrySamePhotoHelps":{"type":"boolean"}}}}}],"discriminator":{"propertyName":"status"}}}}}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"batchId missing","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"API key lacks the staging:read scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"404":{"description":"No job of this tenant carries the batchId","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/compliance":{"post":{"operationId":"validateCompliance","summary":"MLS Compliance Validation","description":"Validates that a staged image complies with MLS disclosure requirements. Each call costs 1 credit, reserved before validation and refunded when validation does not complete.","tags":["Compliance"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["originalImage","stagedImage"],"properties":{"originalImage":{"type":"string","description":"Original room photo: base64, data URL, or a public HTTPS URL. Any other URL is rejected with 400 before a credit is reserved."},"stagedImage":{"type":"string","description":"Staged room photo to validate: base64, data URL, or a public HTTPS URL. Any other URL is rejected with 400 before a credit is reserved."},"roomType":{"type":"string"},"strictMode":{"type":"boolean","default":false},"includeProportions":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"Compliance validation result","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"compliance":{"type":"object","properties":{"isCompliant":{"type":"boolean"},"mlsSafe":{"type":"boolean"},"confidenceScore":{"type":"number","minimum":0,"maximum":100},"violations":{"type":"array","items":{"type":"object"}},"changesMade":{"type":"array","items":{"type":"object"}},"preservedElements":{"type":"array","items":{"type":"object"}}}},"proportions":{"type":"object","nullable":true,"properties":{"overallRating":{"type":"string","enum":["excellent","good","needs_adjustment","poor"]},"furnitureScale":{"type":"string","enum":["appropriate","oversized","undersized"]},"issues":{"type":"array","items":{"type":"object"}},"recommendations":{"type":"array","items":{"type":"string"}}}},"processingMs":{"type":"integer"},"strictMode":{"type":"boolean"},"roomType":{"type":"string","nullable":true}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"Validation error, or an image URL that is not public HTTPS. Rejected before any credit is reserved.","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"402":{"description":"Monthly allowance used up; error.details carries required (1) and available","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"503":{"description":"Analysis, credit reservation or credit settlement unavailable. No credit is charged; retry.","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/intelligence":{"post":{"operationId":"analyzeArchitecturalIntelligence","summary":"Architectural Intelligence Analysis","description":"Constraint detection, lock map generation, scoring, and structural diff. Each call costs 1 credit, reserved before analysis and refunded when the analysis does not complete.","tags":["Intelligence"],"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["imageUrl","analysisType"],"properties":{"imageUrl":{"type":"string"},"analysisType":{"type":"string","enum":["score","diff","detect","full"]},"options":{"type":"object","properties":{"projectType":{"type":"string","enum":["interior","exterior","landscape"],"default":"interior"},"strategyTier":{"type":"string","enum":["tier1","tier2","tier3"],"default":"tier1"},"jobType":{"type":"string","enum":["staging","renovation"],"default":"renovation"}}}}}}}},"responses":{"200":{"description":"Analysis result (fields vary by analysisType)","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","additionalProperties":true},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"Validation error, or an imageUrl that is not a public HTTPS or data: image URL. Rejected before any credit is reserved.","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"402":{"description":"Monthly allowance used up; error.details carries required (1) and available","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"Insufficient scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"503":{"description":"Analysis, credit reservation or credit settlement unavailable. No credit is charged; retry.","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/images/{imageId}/verification":{"get":{"operationId":"getImageVerification","summary":"Structural verification evidence for a delivered image","description":"The delivery decision, the per-category verification summary, and the full element-level record (constraint set id, one verdict per locked window/door with its raw edge-retention, edge-novelty and luminance measurements, the contract check, and any targeted correction applied on retry). Requires staging:read. 404 when the image predates verification.","tags":["Staging"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"imageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Verification evidence","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"imageId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"delivery":{"type":"object","properties":{"state":{"type":"string","enum":["RELTO_GUARANTEED","REQUIRES_APPROVAL","MANUALLY_APPROVED","BLOCKED","UNCLASSIFIED"]},"reasonCode":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time"}}},"summary":{"type":"object","properties":{"state":{"type":"string","enum":["verified","review_required","approved_by_review","blocked","unverified"]},"headline":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["preserved","altered","inconclusive","not_applicable"]},"source":{"type":"string","enum":["measured","ai_review"]},"detail":{"type":"string","nullable":true}}}},"constraintSetId":{"type":"string","nullable":true},"measuredElementCount":{"type":"integer","description":"Windows and doors compared pixel by pixel. Never includes AI-reviewed checks."},"aiReviewedCheckCount":{"type":"integer","description":"Category lines an AI model judged and answered (source ai_review). Counted separately from measuredElementCount, never summed with it."},"measurementSkipReason":{"type":"string","nullable":true,"description":"Why no window or door was measured on the delivered artifact (detector located none and which fallback it took, measurement skipped for budget, no record on the delivering path). Null when they were measured."},"reasonCode":{"type":"string","nullable":true}}},"record":{"type":"object","description":"Per-attempt element-level record: constraintSetId, elements[] with status and evidence, summary counts, contract check, drift operability, and correction when a targeted retry produced the artifact."}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Invalid or missing API key"},"403":{"description":"Insufficient scope"},"404":{"description":"Image not found for this tenant, or no verification evidence"}}}},"/api/v1/staging/{jobId}/verification":{"get":{"operationId":"getJobVerification","summary":"Structural verification evidence for a staging job","description":"The evidence behind a job's delivery classification: the delivery decision, the per-category summary returned on the job status, and the element-level record (one verdict per locked window or door with its normalized box and raw edge-retention, edge-novelty and luminance measurements, plus the contract check). Use this for jobs submitted through the API, which create no gallery image. Requires staging:read. 404 when the job predates evidence recording or was not measured.","tags":["Staging"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification evidence","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"jobId":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"delivery":{"type":"object","properties":{"state":{"type":"string","enum":["RELTO_GUARANTEED","REQUIRES_APPROVAL","MANUALLY_APPROVED","BLOCKED","UNCLASSIFIED"]},"reasonCode":{"type":"string","nullable":true},"decidedAt":{"type":"string","format":"date-time"}}},"summary":{"type":"object","properties":{"state":{"type":"string","enum":["verified","review_required","approved_by_review","blocked","unverified"]},"headline":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["preserved","altered","inconclusive","not_applicable"]},"source":{"type":"string","enum":["measured","ai_review"]},"detail":{"type":"string","nullable":true}}}},"constraintSetId":{"type":"string","nullable":true},"measuredElementCount":{"type":"integer","description":"Windows and doors compared pixel by pixel. Never includes AI-reviewed checks."},"aiReviewedCheckCount":{"type":"integer","description":"Category lines an AI model judged and answered (source ai_review). Counted separately from measuredElementCount, never summed with it."},"measurementSkipReason":{"type":"string","nullable":true,"description":"Why no window or door was measured on the delivered artifact (detector located none and which fallback it took, measurement skipped for budget, no record on the delivering path). Null when they were measured."},"reasonCode":{"type":"string","nullable":true}}},"record":{"type":"object","description":"Per-attempt element-level record: constraintSetId, elements[] with status and evidence, summary counts, contract check, drift operability, and correction when a targeted retry produced the artifact."}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Invalid or missing API key"},"403":{"description":"Insufficient scope"},"404":{"description":"Job not found for this tenant, or no verification evidence"}}}},"/api/v1/usage":{"get":{"operationId":"getTenantUsage","summary":"Tenant usage statistics","tags":["Usage"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"period","in":"query","schema":{"type":"string","default":"current","description":"'current', 'previous', or 'YYYY-MM'"}}],"responses":{"200":{"description":"Usage data","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","properties":{"tenant":{"type":"object","properties":{"name":{"type":"string"},"planTier":{"type":"string"},"creditPool":{"type":"integer"},"creditPoolLimit":{"type":"integer"}}},"period":{"type":"string","example":"2026-04"},"remaining":{"type":"integer","nullable":true,"description":"Generations the tenant can still reserve this month: tenant.creditPool minus usage.stagingCount, floored at 0 (0 when no pool is configured). Every plan tier is capped by its pool. Only reported for period=current; null for any other period."},"usage":{"type":"object","properties":{"stagingCount":{"type":"integer"},"renovationCount":{"type":"integer"},"apiCallCount":{"type":"integer"},"storageBytesUsed":{"type":"integer"},"creditsConsumed":{"type":"integer","description":"Net staging reservations this period. Increments with stagingCount when a job is reserved and decrements when that reservation is refunded."},"creditsPurchased":{"type":"integer"},"activeUsers":{"type":"integer"}}}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"400":{"description":"Invalid period; use 'current', 'previous' or YYYY-MM","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"403":{"description":"API key lacks the usage:read scope","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/policy/boards":{"get":{"operationId":"listPolicyBoards","summary":"Index of the MLS boards RELTO has researched","description":"Read-only. Needs a valid test or live key and no scope; the data is already public on relto.app, and the key is for attribution and rate limiting. Calls no model and reserves no credit. Sorted by board name.","tags":["Policy"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Every researched board","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","required":["boards"],"properties":{"boards":{"type":"array","items":{"type":"object","required":["slug","name","fullName","states","hasRulebook","staffConfirmationCount","canonicalUrl","asOf"],"properties":{"slug":{"type":"string","example":"bright-mls"},"name":{"type":"string"},"fullName":{"type":"string"},"states":{"type":"array","items":{"type":"object","required":["name","code"],"properties":{"name":{"type":"string"},"code":{"type":"string","example":"MD"}}}},"hasRulebook":{"type":"boolean","description":"True when RELTO holds rule text quoted from the board’s own rulebook."},"staffConfirmationCount":{"type":"integer","description":"Number of written confirmations from the board’s own staff."},"canonicalUrl":{"type":"string","format":"uri","description":"The board’s page on relto.app."},"asOf":{"type":"string","format":"date","description":"Latest date in the record: state entry verification dates, the rulebook effective and read dates, and confirmation dates."}}}}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/policy/boards/{slug}":{"get":{"operationId":"getPolicyBoard","summary":"One MLS board policy record","description":"Read-only. Needs a valid test or live key and no scope. Every value is copied from the research behind the public board pages; nothing is derived. Calls no model and reserves no credit.","tags":["Policy"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","example":"bright-mls"},"description":"Board slug from GET /api/v1/policy/boards"}],"responses":{"200":{"description":"The board record","content":{"application/json":{"schema":{"type":"object","required":["ok","data"],"properties":{"ok":{"type":"boolean","const":true},"data":{"type":"object","required":["slug","name","fullName","canonicalUrl","markdownUrl","asOf","jurisdictions","rulebook","staffConfirmations","notLegalAdvice"],"properties":{"slug":{"type":"string","example":"bright-mls"},"name":{"type":"string"},"fullName":{"type":"string"},"canonicalUrl":{"type":"string","format":"uri"},"markdownUrl":{"type":"string","format":"uri","description":"Plain-text twin of the board page."},"asOf":{"type":"string","format":"date","description":"Latest date in the record."},"jurisdictions":{"type":"array","description":"One entry per state entry that documents this board.","items":{"type":"object","required":["state","stateCode","stateSlug","riskLevel","stateEntryConfidence","stateEntryVerifiedAt","provenance","publicRuleSource","citations","subscribers","disclosureRule","permitted","prohibited","penalty"],"properties":{"state":{"type":"string"},"stateCode":{"type":"string","example":"MD"},"stateSlug":{"type":"string"},"riskLevel":{"type":"string","enum":["highest","high","moderate"]},"stateEntryConfidence":{"type":"string","enum":["verified_public_rulebook","verified_secondary_guidance","observed_market_practice","baseline_only"],"description":"Confidence tier of the parent state entry, not of the board rule."},"stateEntryVerifiedAt":{"type":"string","format":"date","description":"Date the parent state entry was verified, not a board-specific date."},"provenance":{"type":"string","description":"States that the two fields above describe the parent state entry."},"publicRuleSource":{"type":["string","null"]},"citations":{"type":"array","items":{"type":"object","required":["label","url"],"properties":{"label":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"subscribers":{"type":["string","null"]},"disclosureRule":{"type":"string"},"permitted":{"type":"string"},"prohibited":{"type":"string"},"penalty":{"type":"string"}}}},"rulebook":{"type":["object","null"],"description":"Rule text quoted from the board’s own rulebook; null when RELTO holds none.","required":["title","effectiveDate","source","coverage","quotes","fines","faqs"],"properties":{"title":{"type":"string"},"effectiveDate":{"type":"string","format":"date"},"source":{"type":"object","required":["label","publisher","url","tier","reviewedOn","verificationNote"],"properties":{"label":{"type":"string"},"publisher":{"type":"string"},"url":{"type":"string","format":"uri"},"tier":{"type":"string"},"reviewedOn":{"type":"string","format":"date","description":"Date RELTO read the source."},"verificationNote":{"type":["string","null"]}}},"coverage":{"type":"string"},"quotes":{"type":"array","items":{"type":"object","required":["citation","heading","text","citationNote"],"properties":{"citation":{"type":"string"},"heading":{"type":"string"},"text":{"type":"string","description":"Rule text, verbatim."},"citationNote":{"type":["string","null"]}}}},"fines":{"type":"array","items":{"type":"object","required":["violation","ruleReference","hasWarning","amount","scheduleCitation"],"properties":{"violation":{"type":"string"},"ruleReference":{"type":"string"},"hasWarning":{"type":"boolean"},"amount":{"type":"string"},"scheduleCitation":{"type":"string"}}}},"faqs":{"type":"array","items":{"type":"object","required":["question","answer","citations"],"properties":{"question":{"type":"string"},"answer":{"type":"string"},"citations":{"type":"array","items":{"type":"string"}}}}}}},"staffConfirmations":{"type":"array","items":{"type":"object","required":["confirmedOn","confirmedBy","ruleReference","question","answer"],"properties":{"confirmedOn":{"type":"string","format":"date"},"confirmedBy":{"type":"string","description":"Team or role that answered, never a person."},"ruleReference":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string","description":"The board’s reply, paraphrased."}}}},"notLegalAdvice":{"type":"string"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"404":{"description":"Unknown slug; the message names GET /api/v1/policy/boards","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"type":"boolean","const":false},"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","VALIDATION_ERROR","NOT_FOUND","RATE_LIMITED","QUOTA_EXCEEDED","INSUFFICIENT_CREDITS","OPERATION_FAILED","INTERNAL_ERROR","SERVICE_UNAVAILABLE","CONFLICT"],"description":"Machine-readable error code"},"message":{"type":"string","description":"Human-readable error message"},"retryable":{"type":"boolean","description":"Whether the client should retry"},"details":{"type":"object","additionalProperties":true,"description":"Validation errors or extra context"}}},"meta":{"type":"object","properties":{"requestId":{"type":"string","description":"Correlation ID for request tracing","example":"ren-a1b2c3d4"},"timestamp":{"type":"string","format":"date-time","description":"ISO 8601 response timestamp"}}}}}}}}}}},"/api/v1/status":{"get":{"operationId":"getPlatformStatus","summary":"Platform health and SLO status","tags":["Status"],"security":[],"responses":{"200":{"description":"Health status with SLO metrics","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["operational","degraded","major_outage"]},"timestamp":{"type":"string","format":"date-time"},"components":{"type":"object","additionalProperties":true},"slo":{"type":"object","additionalProperties":true}}}}}}}}}}}