{"openapi":"3.1.0","info":{"title":"agentic-endpoints","version":"1.0.0","description":"Pay-per-call utilities for autonomous agents. No signup, no API keys, no invoices: every endpoint answers HTTP 402 with a price and serves the request once payment is signed."},"servers":[{"url":"https://ai.oliverkiss.com"}],"paths":{"/once-key":{"post":{"summary":"Atomic idempotency witness — claim an action exactly once, record its result, and replay that result to every later caller","description":"Atomic idempotency witness — claim an action exactly once, record its result, and replay that result to every later caller. Costs $0.001, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"once_key","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Isolation scope for the claimed key"},"action_key":{"type":"string","description":"Unique key to claim exactly once"},"payload_sha256":{"type":"string","description":"Optional hash of the payload for conflict detection"},"ttl":{"type":"number","description":"Claim lifetime in seconds (default 86400)"},"namespace_token":{"type":"string","description":"Owner token issued on the first claim in a namespace; required on every later request"},"lease_ttl":{"type":"number","description":"Seconds you have to call /once-key/complete before the claim is treated as abandoned and another caller may take it over. Omit to hold the claim for its full ttl."}},"required":["namespace","action_key"]},"example":{"namespace":"invoices","action_key":"charge-order-1042","ttl":86400,"lease_ttl":300}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"claimed","namespace":"my-app-4f9c2b1e8d7a","action_key":"order-12345","claimed_at":"2026-01-01T00:00:00.000Z","lease_expires_at":"2026-01-01T00:05:00.000Z","expires_at":"2026-01-02T00:00:00.000Z","receipt":"abc123..."}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/scrape":{"post":{"summary":"Web scraping and text extraction","description":"Web scraping and text extraction. Costs $0.005, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"scrape","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL to scrape"},"selector":{"type":"string","description":"Optional CSS selector to extract"},"format":{"type":"string","enum":["text","markdown","html"],"description":"Output format (default text)"}},"required":["url"]},"example":{"url":"https://example.com","format":"text"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"url":"https://example.com","title":"Example Domain","content":"This domain is for use in examples...","format":"text","extracted_at":"2026-01-01T00:00:00.000Z"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/pdf-parse":{"post":{"summary":"PDF text extraction","description":"PDF text extraction. Costs $0.01, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"pdf_parse","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL of the PDF"},"pages":{"type":"array","items":{"type":"number"},"description":"Specific pages to extract (default: all)"}},"required":["url"]},"example":{"url":"https://example.com/report.pdf"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"url":"https://example.com/doc.pdf","page_count":3,"pages":[{"page":1,"text":"..."}],"extracted_at":"2026-01-01T00:00:00.000Z"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/compress":{"post":{"summary":"Token compression for LLMs","description":"Token compression for LLMs. Costs $0.005, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"compress","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Text to compress"},"target_tokens":{"type":"number","description":"Target token count"},"strategy":{"type":"string","enum":["extractive","truncate"],"description":"Compression strategy (default extractive)"}},"required":["text"]},"example":{"text":"Long input text to be compressed before it is sent to a model.","target_tokens":100,"strategy":"extractive"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"original_length":5000,"compressed_length":1200,"ratio":0.24,"text":"...","strategy":"extractive"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/vault/store":{"post":{"summary":"Store an encrypted item in the vault. The first store claims the namespace and returns a one-time namespace_token.","description":"Store an encrypted item in the vault. The first store claims the namespace and returns a one-time namespace_token.. Costs $0.02, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"vault_store","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Vault isolation scope"},"key":{"type":"string","description":"Item key"},"ciphertext":{"type":"string","description":"Client-side encrypted payload. This service never sees plaintext."},"alg":{"type":"string","description":"Encryption algorithm label (default aes-256-gcm)"},"ttl":{"type":"number","description":"Optional lifetime in seconds"},"namespace_token":{"type":"string","description":"Required once the namespace has been claimed by a first store"}},"required":["namespace","key","ciphertext"]},"example":{"namespace":"agent-secrets","key":"openai-api-key","ciphertext":"base64-of-your-client-side-encrypted-bytes","alg":"AES-GCM","ttl":604800}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"stored","namespace":"my-app-4f9c2b1e8d7a","key":"secret-1","alg":"aes-256-gcm","size_bytes":128,"created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null,"namespace_token":"shown-once-on-first-store","receipt":"abc123..."}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/vault/delete":{"post":{"summary":"Delete an item from the vault (requires the namespace_token)","description":"Delete an item from the vault (requires the namespace_token). Costs $0.005, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"vault_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Vault isolation scope"},"key":{"type":"string","description":"Item key to delete"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"}},"required":["namespace","key","namespace_token"]},"example":{"namespace":"agent-secrets","key":"openai-api-key","namespace_token":"the token returned by your first store"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"deleted","namespace":"my-app-4f9c2b1e8d7a","key":"secret-1"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/credits/buy":{"post":{"summary":"Buy $6.00 of prepaid credit for $5.00 (20% bonus). Returns a credit token; send it as X-Credit-Token on any paid endpoint to be debited at list price with no per-call payment signature.","description":"Buy $6.00 of prepaid credit for $5.00 (20% bonus). Returns a credit token; send it as X-Credit-Token on any paid endpoint to be debited at list price with no per-call payment signature.. Costs $5.00, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"credits_buy","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}},"example":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"credit_token":"ae_...","balance_usd":"6.000000","paid":"$5.00","bonus":"20%"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/credits/buy-25":{"post":{"summary":"Buy $32.50 of prepaid credit for $25.00 (30% bonus). Returns a credit token; send it as X-Credit-Token on any paid endpoint to be debited at list price with no per-call payment signature.","description":"Buy $32.50 of prepaid credit for $25.00 (30% bonus). Returns a credit token; send it as X-Credit-Token on any paid endpoint to be debited at list price with no per-call payment signature.. Costs $25.00, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"credits_buy_25","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}},"example":{}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"credit_token":"ae_...","balance_usd":"32.500000","paid":"$25.00","bonus":"30%"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/meetings/import":{"post":{"summary":"Import a meeting transcript. visibility \"private\" stores ciphertext this service cannot read; \"queryable\" stores plaintext and indexes it for search. The first import claims the namespace and returns a one-time namespace_token.","description":"Import a meeting transcript. visibility \"private\" stores ciphertext this service cannot read; \"queryable\" stores plaintext and indexes it for search. The first import claims the namespace and returns a one-time namespace_token.. Costs $0.004, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"meetings_import","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Meeting memory isolation scope"},"title":{"type":"string","description":"Human-readable meeting title"},"occurred_at":{"type":"string","description":"ISO-8601 time the meeting happened"},"source":{"type":"string","description":"Free-form label for where the transcript came from (e.g. webvtt, srt, plain-text)"},"visibility":{"type":"string","description":"Required choice. \"queryable\" = plaintext transcript, searchable, readable by this service. \"private\" (default) = ciphertext you encrypted, never searchable. Sending the wrong field for the mode is refused rather than guessed."},"transcript":{"type":"string","description":"Plaintext. Only with visibility \"queryable\""},"ciphertext":{"type":"string","description":"Client-side encrypted. Only with visibility \"private\""},"alg":{"type":"string","description":"Encryption algorithm label for private meetings"},"participants":{"type":"array","description":"Optional list of attendees"},"namespace_token":{"type":"string","description":"Required once the namespace has been claimed"}},"required":["namespace"]},"example":{"namespace":"my-meetings-4f9c2b1e8d7a","title":"Pricing review","occurred_at":"2026-01-04T15:00:00.000Z","source":"webvtt","visibility":"queryable","transcript":"Alice: we agreed to ship the redesign before the audit...","participants":["Alice","Bob"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"imported","meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11","visibility":"queryable","searchable":true,"size_bytes":4820}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/meetings/search":{"post":{"summary":"Full-text search across your queryable meetings. Returns ranked excerpts, and reports how many meetings were private and therefore not searched.","description":"Full-text search across your queryable meetings. Returns ranked excerpts, and reports how many meetings were private and therefore not searched.. Costs $0.006, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"meetings_search","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Meeting memory isolation scope"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"},"query":{"type":"string","description":"FTS5 match expression. Quote phrases: \"budget review\""},"limit":{"type":"number","description":"Max results, 1-50 (default 10)"}},"required":["namespace","namespace_token","query"]},"example":{"namespace":"my-meetings-4f9c2b1e8d7a","namespace_token":"the token returned by your first import","query":"pricing","limit":10}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"ok","query":"pricing","count":1,"matches":[{"meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11","title":"Pricing review","excerpt":"we agreed to defer the [pricing] change until Q3…"}],"searched_meetings":12,"private_meetings_skipped":3}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/meetings/get":{"post":{"summary":"Fetch one meeting in full, by meeting_id (requires the namespace_token)","description":"Fetch one meeting in full, by meeting_id (requires the namespace_token). Costs $0.002, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"meetings_get","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Meeting memory isolation scope"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"},"meeting_id":{"type":"string","description":"Returned by /meetings/import"}},"required":["namespace","namespace_token","meeting_id"]},"example":{"namespace":"my-meetings-4f9c2b1e8d7a","namespace_token":"the token returned by your first import","meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"ok","meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11","title":"Pricing review","visibility":"queryable","transcript":"Alice: we agreed to defer the pricing change until Q3..."}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/meetings/list":{"post":{"summary":"List the meetings in a namespace with their metadata, newest first. Never returns transcripts (requires the namespace_token)","description":"List the meetings in a namespace with their metadata, newest first. Never returns transcripts (requires the namespace_token). Costs $0.001, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"meetings_list","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Meeting memory isolation scope"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"},"limit":{"type":"number","description":"Max results, 1-500 (default 100)"}},"required":["namespace","namespace_token"]},"example":{"namespace":"my-meetings-4f9c2b1e8d7a","namespace_token":"the token returned by your first import"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"ok","count":1,"meetings":[{"meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11","title":"Pricing review","visibility":"queryable","searchable":true}]}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/meetings/delete":{"post":{"summary":"Delete a meeting and remove it from the search index (requires the namespace_token)","description":"Delete a meeting and remove it from the search index (requires the namespace_token). Costs $0.001, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"meetings_delete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Meeting memory isolation scope"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"},"meeting_id":{"type":"string","description":"Returned by /meetings/import"}},"required":["namespace","namespace_token","meeting_id"]},"example":{"namespace":"my-meetings-4f9c2b1e8d7a","namespace_token":"the token returned by your first import","meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"deleted","meeting_id":"6f1c3b90-0f6a-4c2e-9a1e-2b7d5c8e4a11"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/vault/list":{"post":{"summary":"List the keys held in a vault namespace with their metadata, without returning any ciphertext (requires the namespace_token)","description":"List the keys held in a vault namespace with their metadata, without returning any ciphertext (requires the namespace_token). Costs $0.001, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"vault_list","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Vault isolation scope"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"}},"required":["namespace","namespace_token"]},"example":{"namespace":"agent-secrets","namespace_token":"the token returned by your first store"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"listed","count":1,"items":[{"key":"openai-api-key","alg":"aes-256-gcm","size_bytes":184,"created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null}]}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/vault/exists":{"post":{"summary":"Check whether a key exists in the vault without returning its ciphertext (requires the namespace_token)","description":"Check whether a key exists in the vault without returning its ciphertext (requires the namespace_token). Costs $0.001, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"vault_exists","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Vault isolation scope"},"key":{"type":"string","description":"Item key to test"},"namespace_token":{"type":"string","description":"One-time token issued when the namespace was claimed"}},"required":["namespace","key","namespace_token"]},"example":{"namespace":"agent-secrets","key":"openai-api-key","namespace_token":"the token returned by your first store"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"exists":true,"namespace":"my-app-4f9c2b1e8d7a","key":"secret-1"}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/vault/retrieve":{"post":{"summary":"Retrieve an encrypted item from the vault (requires the namespace_token issued at claim time)","description":"Retrieve an encrypted item from the vault (requires the namespace_token issued at claim time). Costs $0.02, paid per call with x402 (USDC on Base), or debited from a prepaid balance by sending an X-Credit-Token header.","operationId":"vault_retrieve","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string","description":"Vault isolation scope"},"key":{"type":"string","description":"Item key to retrieve"},"namespace_token":{"type":"string","description":"One-time token issued by the first /vault/store call that claimed this namespace"}},"required":["namespace","key","namespace_token"]},"example":{"namespace":"agent-secrets","key":"openai-api-key","namespace_token":"the token returned by your first store"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"example":{"status":"retrieved","namespace":"my-app-4f9c2b1e8d7a","key":"secret-1","ciphertext":"base64-encoded-ciphertext","alg":"aes-256-gcm","created_at":"2026-01-01T00:00:00.000Z","updated_at":"2026-01-01T00:00:00.000Z","expires_at":null,"receipt":"abc123..."}}}},"402":{"description":"Payment required. The `payment-required` response header carries a base64 x402 challenge naming the price, asset and recipient. Sign it and retry with an X-PAYMENT header."},"429":{"description":"Rate limited."}}}},"/once-key/complete":{"post":{"summary":"Record the outcome of a claimed action_key","description":"Stores the result of work performed under a claim. Later claims of the same action_key return status \"duplicate\" together with this result, so the caller that lost the race can continue instead of repeating the side effect. Free: the claim price covers the whole lifecycle. Completion is final and cannot be overwritten.","operationId":"once_key_complete","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string"},"action_key":{"type":"string"},"namespace_token":{"type":"string"},"result":{"description":"Any JSON value, up to 16 KB once serialized."},"ttl":{"type":"number","description":"How long to retain the result, in seconds. Default 86400."}},"required":["namespace","action_key"]},"example":{"namespace":"invoices","action_key":"charge-order-1042","namespace_token":"the token issued on your first claim","result":{"charge_id":"ch_abc123","amount":4200}}}}},"responses":{"200":{"description":"Success, or a settled refusal. Paid routes answer 200 with a machine-readable `status` (e.g. \"forbidden\", \"not_found\", \"precondition_failed\", \"conflict\") rather than a 4xx, because any status >=400 cancels x402 settlement and would give the answer away for free. Always branch on `status`, not on the HTTP code."},"400":{"description":"Malformed request."},"404":{"description":"No such record."},"429":{"description":"Rate limited."}}}},"/vault/rotate-token":{"post":{"summary":"Replace a vault namespace token","description":"Mints a new namespace_token and invalidates the current one, which must be presented to authorize the rotation. Free on purpose: charging for the correct response to a suspected leak is how you end up with callers who never rotate. There is no recovery if the token is lost — any such path would be a second way into the namespace and would serve an attacker just as well as the owner.","operationId":"vault_rotate_token","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string"},"namespace_token":{"type":"string"}},"required":["namespace","namespace_token"]},"example":{"namespace":"agent-secrets","namespace_token":"your current token"}}}},"responses":{"200":{"description":"Success, or a settled refusal. Paid routes answer 200 with a machine-readable `status` (e.g. \"forbidden\", \"not_found\", \"precondition_failed\", \"conflict\") rather than a 4xx, because any status >=400 cancels x402 settlement and would give the answer away for free. Always branch on `status`, not on the HTTP code."},"400":{"description":"Malformed request."},"404":{"description":"No such record."},"429":{"description":"Rate limited."}}}},"/once-key/release":{"post":{"summary":"Surrender a claim whose work failed","description":"Frees a claimed action_key so a retry can proceed immediately rather than waiting out the lease. Free. Refuses with 409 if the key was already completed, since releasing it would discard the recorded result and permit a second side effect.","operationId":"once_key_release","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"namespace":{"type":"string"},"action_key":{"type":"string"},"namespace_token":{"type":"string"}},"required":["namespace","action_key"]},"example":{"namespace":"invoices","action_key":"charge-order-1042","namespace_token":"the token issued on your first claim"}}}},"responses":{"200":{"description":"Success, or a settled refusal. Paid routes answer 200 with a machine-readable `status` (e.g. \"forbidden\", \"not_found\", \"precondition_failed\", \"conflict\") rather than a 4xx, because any status >=400 cancels x402 settlement and would give the answer away for free. Always branch on `status`, not on the HTTP code."},"400":{"description":"Malformed request."},"404":{"description":"No such record."},"429":{"description":"Rate limited."}}}},"/credits/balance":{"post":{"summary":"Check a prepaid credit balance","description":"Returns the remaining balance for a credit token, and what it has been spent on. Free, and takes no request body: the token goes in the X-Credit-Token header. Charging a buyer to find out how much they have left would be a good way to never sell them a second one.","operationId":"credits_balance","parameters":[{"name":"X-Credit-Token","in":"header","required":true,"description":"The token issued by /credits/buy. Required.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success, or a settled refusal. Paid routes answer 200 with a machine-readable `status` (e.g. \"forbidden\", \"not_found\", \"precondition_failed\", \"conflict\") rather than a 4xx, because any status >=400 cancels x402 settlement and would give the answer away for free. Always branch on `status`, not on the HTTP code."},"400":{"description":"Malformed request."},"404":{"description":"No such record."},"429":{"description":"Rate limited."}}}}}}