{"openapi":"3.1.0","info":{"title":"CallMint","version":"1.0.0","description":"Prepaid micro APIs and project-based policy checks. USD $0.001 per credit. Four external URL fetch routes disabled; snapshot APIs accept supplied JSON only."},"servers":[{"url":"https://staging.callmint.dev"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"emailSession":{"type":"apiKey","in":"cookie","name":"cm_session"}}},"paths":{"/v1/json-repair":{"post":{"operationId":"json-repair","summary":"Repair fenced JSON and trailing commas","description":"Only removes complete JSON code fences and trailing commas outside strings. Does not infer missing quotes, values or braces. The text field is limited to 50 KB of UTF-8. Costs 2 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","maxLength":50000,"x-maxUtf8Bytes":50000}},"required":["text"]},"example":{"text":"{\"name\":\"CallMint\",}"}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"value":{},"transformations":{"type":"array","items":{"type":"string"}}},"required":["value","transformations"]},"credits_charged":{"const":2},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"value":{"name":"CallMint"},"transformations":["removed_trailing_commas"]},"credits_charged":2,"remaining_credits":4998,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/utm-validator":{"post":{"operationId":"utm-validator","summary":"Build and check UTM campaign URLs","description":"Requires HTTP(S) without embedded credentials. A valid result means source, medium and campaign are nonblank; it does not measure campaign performance. Costs 1 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"utm_source":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200},"utm_medium":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200},"utm_campaign":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200},"utm_term":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200},"utm_content":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200}},"required":["url"]},"example":{"url":"https://example.com/?ref=launch","utm_source":"newsletter","utm_medium":"email","utm_campaign":"november"}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"url":{"type":"string","maxLength":4096,"x-maxUtf8Bytes":4096},"valid":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string"}}},"required":["url","valid","missing"]},"credits_charged":{"const":1},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"url":"https://example.com/?ref=launch&utm_source=newsletter&utm_medium=email&utm_campaign=november","valid":true,"missing":[]},"credits_charged":1,"remaining_credits":4999,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/invoice-validator":{"post":{"operationId":"invoice-validator","summary":"Check invoice arithmetic with decimal rounding","description":"Arithmetic only, not tax-law validation. Up to 200 lines. Nonnegative fixed-point values only; quantities and unit prices have at most six decimals. Tax, discount and total use currency precision: JPY 0, KWD 3, others 2. Each line rounds half up before summing; discount is a fixed invoice amount. Prefer decimal strings. No scientific notation, unsafe totals or discount exceeding subtotal. Costs 20 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","properties":{"quantity":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"unit_price":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]}},"required":["quantity","unit_price"]}},"total":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"tax":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"discount":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"currency":{"enum":["USD","EUR","GBP","AUD","CAD","JPY","KWD"]}},"required":["items","total"]},"example":{"items":[{"quantity":2,"unit_price":"10.00"}],"tax":"2.00","total":"22.00","currency":"USD"}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"valid":{"type":"boolean"},"currency":{"type":"string","maxLength":3,"x-maxUtf8Bytes":3},"rounding":{"const":"half_up_per_line"},"line_totals":{"type":"array","items":{"type":"number"}},"subtotal":{"type":"number"},"expected_total":{"type":"number"},"provided_total":{"type":"number"},"difference":{"type":"number"},"note":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["valid","currency","rounding","line_totals","subtotal","expected_total","provided_total","difference","note"]},"credits_charged":{"const":20},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"valid":true,"currency":"USD","rounding":"half_up_per_line","line_totals":[20],"subtotal":20,"expected_total":22,"provided_total":22,"difference":0,"note":"Arithmetic only. Tax calculation and jurisdiction rules not verified."},"credits_charged":20,"remaining_credits":4980,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/webhook-hmac":{"post":{"operationId":"webhook-hmac","summary":"Verify generic HMAC-SHA256 signatures","description":"Generic raw UTF-8 HMAC only. Not a Stripe webhook verifier. Signature accepts 64 hex characters with an optional sha256= prefix. Do not send production secrets unless you accept processing them by this service; request bodies are not logged or retained. Costs 1 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string","maxLength":1000,"x-maxUtf8Bytes":1000},"payload":{"type":"string","maxLength":50000,"x-maxUtf8Bytes":50000},"signature":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100}},"required":["secret","payload","signature"]},"example":{"secret":"key","payload":"The quick brown fox jumps over the lazy dog","signature":"f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8"}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"valid":{"type":"boolean"},"algorithm":{"const":"HMAC-SHA256"},"note":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["valid","algorithm","note"]},"credits_charged":{"const":1},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"valid":true,"algorithm":"HMAC-SHA256","note":"Generic raw-body hex HMAC only; not a Stripe signature verifier"},"credits_charged":1,"remaining_credits":4999,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/jsonld-validator":{"post":{"operationId":"jsonld-validator","summary":"Check JSON-LD syntax and basic structure","description":"Accepts an object or a nonempty array of objects, including an encoded JSON string. Does not resolve contexts or check Schema.org semantics. Array responses report false for the two top-level presence flags. Costs 5 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"document":{"oneOf":[{"type":"string","maxLength":50000,"x-maxUtf8Bytes":50000},{"type":"object"},{"type":"array","minItems":1,"items":{"type":"object"}}]}},"required":["document"]},"example":{"document":{"@context":"https://schema.org","@type":"Thing"}}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"valid":{"type":"boolean"},"has_context":{"type":"boolean"},"has_type":{"type":"boolean"},"note":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["valid","has_context","has_type","note"]},"credits_charged":{"const":5},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"valid":true,"has_context":true,"has_type":true,"note":"Syntax/basic structure only; not full schema.org validation"},"credits_charged":5,"remaining_credits":4995,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/metadata":{"post":{"operationId":"metadata","summary":"Public HTML metadata extraction — coming soon","description":"Unavailable: connection-level public-IP enforcement and a robust HTML parser have not been verified. No outbound fetch or billing occurs. Unavailable and unbilled.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/redirects":{"post":{"operationId":"redirects","summary":"Public redirect inspection — coming soon","description":"Unavailable: safe destination enforcement across redirects and DNS rebinding has not been verified. No outbound fetch or billing occurs. Unavailable and unbilled.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/email-domain":{"post":{"operationId":"email-domain","summary":"Look up a domain’s MX and DMARC records","description":"Uses a fixed Cloudflare DNS-over-HTTPS resolver, never the supplied domain as an HTTP destination. Maximum 20 records per result and 32 KB per DNS response. NXDOMAIN/no records is successful data and billed. Resolver errors/timeouts are not billed. Does not verify mailbox existence, SPF or DMARC policy validity. DNS examples are illustrative and can change. Costs 3 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"x-maxUtf8Bytes":253}},"required":["domain"]},"example":{"domain":"example.org"}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"x-maxUtf8Bytes":253},"mx":{"type":"array","items":{"type":"string"}},"dmarc":{"type":"array","items":{"type":"string"}},"note":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["domain","mx","dmarc","note"]},"credits_charged":{"const":3},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"domain":"example.org","mx":["0 ."],"dmarc":[],"note":"DNS records only; does not verify a mailbox, SPF or DMARC policy correctness."},"credits_charged":3,"remaining_credits":4997,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/robots":{"post":{"operationId":"robots","summary":"Robots directive inspection — coming soon","description":"Unavailable: safe egress has not been verified. No authoritative bot allow/deny or RFC 9309 compliance is claimed. No outbound fetch or billing occurs. Unavailable and unbilled.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"agent":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/sitemap":{"post":{"operationId":"sitemap","summary":"Sitemap structure inspection — coming soon","description":"Unavailable: safe egress and bounded XML parsing have not been verified. No full-site crawl, outbound fetch or billing occurs. Unavailable and unbilled.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/invoice-policy":{"post":{"operationId":"invoice-policy","summary":"Invoice Policy API","description":"30 credits per successful check, including a failed policy finding. Uses invoice-validator arithmetic. Duplicate identity is the normalized vendor and invoice number within one project, retained for 90 days; a retry with the same Idempotency-Key is not a duplicate. Select an explicit policy version. Findings retain no raw invoice; policy rules may contain a vendor requirement. Not tax-law validation. Costs 30 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100},"rule_version":{"type":"integer","minimum":1},"invoice":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","properties":{"quantity":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"unit_price":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]}},"required":["quantity","unit_price"]}},"total":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"tax":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"discount":{"oneOf":[{"type":"number","minimum":0,"maximum":999999999999},{"type":"string","pattern":"^\\d{1,12}(\\.\\d{1,6})?$"}]},"currency":{"enum":["USD","EUR","GBP","AUD","CAD","JPY","KWD"]},"vendor":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200},"invoice_number":{"type":"string","maxLength":200,"x-maxUtf8Bytes":200}},"required":["items","total"],"description":"Vendor and invoice_number are required unless duplicate_check is false in the chosen policy."}},"required":["project_id","rule_version","invoice"]},"example":{"project_id":"YOUR_PROJECT_ID","rule_version":1,"invoice":{"vendor":"Example vendor","invoice_number":"INV-001","items":[{"quantity":2,"unit_price":"10.00"}],"total":"20.00","currency":"USD"}}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"passed":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"]}},"required":["code","message","severity"]}},"severity":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"rule_version":{"type":"integer"},"checked_at":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"project_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"kind":{"const":"invoice"},"fingerprint":{"type":["string","null"]},"duplicate":{"type":"boolean"},"changes":{"type":"array"}},"required":["passed","findings","severity","rule_version","checked_at","project_id","kind","fingerprint","duplicate","changes"]},"credits_charged":{"const":30},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"project_id":"YOUR_PROJECT_ID","kind":"invoice","passed":true,"findings":[],"severity":"none","rule_version":1,"checked_at":"2026-11-03T00:00:00.000Z","fingerprint":"KEYED_DIGEST","duplicate":false,"changes":[]},"credits_charged":30,"remaining_credits":4970,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/crawler-policy":{"post":{"operationId":"crawler-policy","summary":"AI Crawler Policy Snapshot Comparison","description":"20 credits. Customer-supplied normalized permissions only, at most 20 crawler names. Does not fetch or parse robots.txt, claim RFC 9309 compliance, grant legal permission or guarantee AI visibility. No background monitoring. Caller is responsible for obtaining accurate snapshots. External robots fetching remains disabled. Costs 20 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100},"rule_version":{"type":"integer","minimum":1},"baseline_id":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100},"current":{"type":"object","properties":{"crawlers":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":100},"additionalProperties":{"type":"boolean"}}},"required":["crawlers"],"additionalProperties":false}},"required":["project_id","rule_version","baseline_id","current"]},"example":{"project_id":"YOUR_PROJECT_ID","rule_version":1,"baseline_id":"YOUR_SNAPSHOT_ID","current":{"crawlers":{"GPTBot":true}}}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"passed":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"]}},"required":["code","message","severity"]}},"severity":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"rule_version":{"type":"integer"},"checked_at":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"project_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"kind":{"const":"crawler"},"fingerprint":{"type":"null"},"duplicate":{"type":"boolean"},"changes":{"type":"array"}},"required":["passed","findings","severity","rule_version","checked_at","project_id","kind","fingerprint","duplicate","changes"]},"credits_charged":{"const":20},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"project_id":"YOUR_PROJECT_ID","kind":"crawler","passed":true,"findings":[],"severity":"none","rule_version":1,"checked_at":"2026-11-03T00:00:00.000Z","fingerprint":null,"duplicate":false,"changes":[]},"credits_charged":20,"remaining_credits":4980,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/v1/seo-guard":{"post":{"operationId":"seo-guard","summary":"SEO Deployment Guard Snapshot Comparison","description":"50 credits. Compares supplied title, description, canonical, indexing flag and structured-data type list. Does not fetch HTML, verify indexing, crawl redirects or validate structured-data semantics. Baselines are explicit and immutable; no scheduler or dashboard. Costs 50 credits. JSON request cap: 60,000 UTF-8 bytes. String field caps are also UTF-8 bytes.","security":[{"bearerAuth":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,128}$"},"description":"Unique per account across endpoints. Same endpoint and parsed JSON serialization replays the result for 24h. Property order matters. Tombstones retained thereafter; reuse returns 409 and never charges again."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100},"rule_version":{"type":"integer","minimum":1},"baseline_id":{"type":"string","maxLength":100,"x-maxUtf8Bytes":100},"current":{"type":"object","properties":{"title":{"type":"string","maxLength":2048},"description":{"type":"string","maxLength":2048},"canonical":{"type":"string","maxLength":2048,"description":"Empty or HTTPS URL without credentials."},"indexable":{"type":"boolean"},"jsonld_types":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":100}}},"required":["title","description","canonical","indexable","jsonld_types"],"additionalProperties":false}},"required":["project_id","rule_version","baseline_id","current"]},"example":{"project_id":"YOUR_PROJECT_ID","rule_version":1,"baseline_id":"YOUR_SNAPSHOT_ID","current":{"title":"Example","description":"Example page","canonical":"https://example.com/","indexable":true,"jsonld_types":["WebPage"]}}}}},"responses":{"200":{"description":"Success; charged once. Remaining credits are a snapshot at settlement. Retries replay that snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"object","properties":{"passed":{"type":"boolean"},"findings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"severity":{"enum":["error","warning"]}},"required":["code","message","severity"]}},"severity":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"rule_version":{"type":"integer"},"checked_at":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"project_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"kind":{"const":"seo"},"fingerprint":{"type":"null"},"duplicate":{"type":"boolean"},"changes":{"type":"array"}},"required":["passed","findings","severity","rule_version","checked_at","project_id","kind","fingerprint","duplicate","changes"]},"credits_charged":{"const":50},"remaining_credits":{"type":"integer","minimum":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["result","credits_charged","remaining_credits","request_id"]},"example":{"result":{"project_id":"YOUR_PROJECT_ID","kind":"seo","passed":true,"findings":[],"severity":"none","rule_version":1,"checked_at":"2026-11-03T00:00:00.000Z","fingerprint":null,"duplicate":false,"changes":[]},"credits_charged":50,"remaining_credits":4950,"request_id":"example-request-id"}}}},"400":{"description":"invalid_input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"401":{"description":"invalid_api_key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"402":{"description":"insufficient_credits","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"403":{"description":"account_suspended","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"409":{"description":"idempotency_conflict / request_in_progress / result_expired / reservation_expired","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"415":{"description":"unsupported_media_type","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"502":{"description":"upstream_error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"503":{"description":"endpoint_unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}},"504":{"description":"upstream_timeout","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048},"credits_charged":{"const":0},"request_id":{"type":"string","maxLength":2048,"x-maxUtf8Bytes":2048}},"required":["error","credits_charged"]}}}}}}},"/billing/balance":{"get":{"summary":"Current balance","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Balance","content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"type":"integer","minimum":0}},"required":["credits"]}}}},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"429":{"description":"rate_limited"}}}},"/billing/checkout":{"post":{"summary":"Buy credits for an authenticated account","description":"Requires bearer key or verified same-origin email session. Public email is not ownership proof. 503 while mail/payments are unconfigured. Never returns an API key.","security":[{"bearerAuth":[]},{"emailSession":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","minLength":8,"maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pack":{"enum":[5000,10000,25000]}},"required":["pack"]}}}},"responses":{"200":{"description":"Stripe-hosted checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"checkout_url":{"type":"string","format":"uri"}},"required":["checkout_url"]}}}},"401":{"description":"verification_required"},"409":{"description":"idempotency_conflict / checkout_expired / checkout_not_open"},"503":{"description":"checkout_unavailable"}}}},"/projects":{"get":{"summary":"List up to 100 active projects","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"integer"}},"required":["id","name","created_at"]}}},"required":["projects"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}},"post":{"summary":"Create a tenant-scoped project","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"string"}},"required":["project_id"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}}},"/projects/{project_id}":{"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete customer content and retain a billing tombstone","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}}},"/projects/{project_id}/policies":{"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"List immutable policy versions (first 100)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"policies":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["invoice","crawler","seo"]},"version":{"type":"integer"},"rules":{"type":"object"},"created_at":{"type":"integer"}},"required":["kind","version","rules","created_at"]}}},"required":["policies"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}},"post":{"summary":"Append an immutable policy version; no charge","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"const":"invoice"},"rules":{"type":"object","properties":{"currencies":{"type":"array","minItems":1,"maxItems":7,"items":{"enum":["USD","EUR","GBP","AUD","CAD","JPY","KWD"]}},"max_total":{"type":"number","minimum":0,"maximum":999999999999},"required_vendor":{"type":"string","maxLength":200},"duplicate_check":{"type":"boolean"}},"required":[],"additionalProperties":false}},"required":["kind","rules"]},{"type":"object","properties":{"kind":{"const":"crawler"},"rules":{"type":"object","properties":{"required_allowed":{"type":"array","maxItems":20,"items":{"type":"string","minLength":1,"maxLength":100}}},"required":["required_allowed"],"additionalProperties":false}},"required":["kind","rules"]},{"type":"object","properties":{"kind":{"const":"seo"},"rules":{"type":"object","properties":{"require_canonical":{"type":"boolean"},"require_indexable":{"type":"boolean"},"require_jsonld":{"type":"boolean"},"fail_on_title_change":{"type":"boolean"}},"required":[],"additionalProperties":false}},"required":["kind","rules"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["invoice","crawler","seo"]},"rule_version":{"type":"integer"}},"required":["kind","rule_version"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}}},"/projects/{project_id}/snapshots":{"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"post":{"summary":"Save an immutable supplied baseline; no network fetch","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"const":"crawler"},"data":{"type":"object","properties":{"crawlers":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":100},"additionalProperties":{"type":"boolean"}}},"required":["crawlers"],"additionalProperties":false}},"required":["kind","data"]},{"type":"object","properties":{"kind":{"const":"seo"},"data":{"type":"object","properties":{"title":{"type":"string","maxLength":2048},"description":{"type":"string","maxLength":2048},"canonical":{"type":"string","maxLength":2048,"description":"Empty or HTTPS URL without credentials."},"indexable":{"type":"boolean"},"jsonld_types":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":100}}},"required":["title","description","canonical","indexable","jsonld_types"],"additionalProperties":false}},"required":["kind","data"]}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snapshot_id":{"type":"string"}},"required":["snapshot_id"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}}},"/projects/{project_id}/results":{"parameters":[{"in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"get":{"summary":"Latest 100 validation findings; content expires after 90 days","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"request_id":{"type":"string"},"kind":{"enum":["invoice","crawler","seo"]},"rule_version":{"type":"integer"},"result":{"type":["object","null"]},"created_at":{"type":"integer"}},"required":["request_id","kind","rule_version","result","created_at"]}}},"required":["results"]}}}},"400":{"description":"invalid_input"},"401":{"description":"invalid_api_key"},"403":{"description":"account_suspended"},"404":{"description":"project_not_found"},"409":{"description":"project_limit"},"429":{"description":"rate_limited"}}}}}}