{"openapi":"3.1.0","info":{"title":"ManyFish Seller APIs","version":"1.0.0","description":"Try eligible APIs with free service credit. Each verified EVM externally owned wallet receives $0.050 once, shared across APIs with no expiry. No deposit, payment, on-chain transaction, API key, or registration is required. Wallet sign-in (SIWX) is required; contract wallets are not supported. Credit is nontransferable. Execution requires sufficient credit, daily trial budget, and API availability. x402-paid maps, content conversion, web answer, image understanding, and token market analysis APIs. Quality review is enabled: executed paid and trial request/response bodies, including uploaded documents and images, are retained in private storage for operator review. Deletion is scheduled after 30 days and runs asynchronously. Authentication and payment headers are not recorded. Do not submit secrets or unnecessary personal data.","contact":{"name":"ManyFish","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/agent.json"},"x-guidance":"Try eligible APIs with free service credit. Each verified EVM externally owned wallet receives $0.050 once, shared across APIs with no expiry. No deposit, payment, on-chain transaction, API key, or registration is required. Wallet sign-in (SIWX) is required; contract wallets are not supported. Credit is nontransferable. Execution requires sufficient credit, daily trial budget, and API availability. Start with a covered operation's externalDocs quickstart and first x-codeSamples entry. Use wrapFetchWithSIWx from @x402/extensions/sign-in-with-x with plain fetch and your existing EOA signer. Do not wrap a payment-enabled fetch for trial-only access. The optional /assets/trial-client.js helper adds strict quote, challenge and accounting validation. No private-key export or new wallet is needed when using an existing signer. A paid-only x402 client does not automatically use trial credit. Stop on a denial, failure, or uncertain accounting; payment is a separate explicit choice. Protocol reference: call a POST operation with its documented JSON body without payment headers, base64-decode the PAYMENT-REQUIRED header, sign the fresh SIWX challenge, and retry once with SIGN-IN-WITH-X."},"x-seller-trial":{"grantAtomic":"50000","unit":"micro-USD","expires":false,"description":"Try eligible APIs with free service credit. Each verified EVM externally owned wallet receives $0.050 once, shared across APIs with no expiry. No deposit, payment, on-chain transaction, API key, or registration is required. Wallet sign-in (SIWX) is required; contract wallets are not supported. Credit is nontransferable. Execution requires sufficient credit, daily trial budget, and API availability.","grantPolicy":"once_per_wallet_shared_across_apis","network":"eip155:8453","dailyBudgetAtomic":"5000000","documentationUrl":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/openapi.json","authentication":{"extension":"sign-in-with-x","header":"SIGN-IN-WITH-X","encoding":"base64-encoded JSON","signatureScheme":"eip191","challengeLifetimeSeconds":300},"paymentPolicy":"Payment headers always take precedence over trial proofs. Never automatically pay after a trial outage, invalid proof, or uncertain accounting. Existing paid-only clients do not automatically use trial credit.","nextSteps":{"discovery_probe":{"action":"submit_valid_request","description":"Start with the trial-only quickstart and your existing wallet signer; it handles sign-in without paying. Supply the documented JSON body. Empty requests only discover the API; they do not execute it or create trial accounts."},"challenge":{"action":"sign_and_retry","description":"Use the trial-only quickstart with your existing wallet signer to sign in and request a result without paying. For a manual integration, sign the fresh challenge and resend the identical URL, method, and JSON body with SIGN-IN-WITH-X, without payment headers. This signature authenticates one request; it is not a payment."},"insufficient_balance":{"action":"choose_paid_request","description":"The wallet cannot cover the full quote. Payment requires an explicit choice; there is no partial credit-plus-payment split. Trial-only clients must stop without paying."},"daily_budget_exhausted":{"action":"wait_or_choose_paid_request","description":"The global UTC-day trial budget is exhausted. Request a fresh challenge on a later UTC day, or explicitly choose payment. Do not repeatedly retry the proof or automatically pay."},"unavailable":{"action":"stop","description":"Trial service is temporarily unavailable and no usable challenge was issued. Stop this attempt without automatically paying. An independent, explicitly paid request remains available."}},"retryPolicy":"One fresh challenge and one signed request per execution. Nonces expire after 300 seconds and can be used only once. Stop on malformed or invalid proof, unavailable trials, redirects, network failures, or uncertain accounting; never automatically repeat business work or pay.","coveragePolicy":"coveredByInitialGrant compares the effective fixed API price with the initial grant, not the wallet's current balance or API availability. Prices above the grant cannot be trialed. There is no partial credit-plus-payment split."},"servers":[{"url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io"}],"paths":{"/api/v1/maps/geocode":{"post":{"operationId":"maps_geocode","summary":"Geocoding API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Geocode an address or place name into latitude, longitude, normalized address, IANA time zone and current UTC offset. Use for location lookup and scheduling across time zones. Paid price: $0.014. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/geocode#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/geocode#quickstart"},"tags":["maps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string","minLength":1,"pattern":".*\\S.*"},"language":{"type":"string","minLength":2,"maxLength":35,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"},"limit":{"type":"integer","minimum":1,"maximum":5},"biasLatitude":{"type":"number","minimum":-90,"maximum":90},"biasLongitude":{"type":"number","minimum":-180,"maximum":180}},"dependentRequired":{"biasLatitude":["biasLongitude"],"biasLongitude":["biasLatitude"]}},"example":{"query":"Space Needle, Seattle","language":"en-US","limit":3}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"query":{"type":"string"},"utcOffsetAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"count":{"type":"integer","minimum":0},"results":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"formattedAddress":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"streetNumber":{"type":["string","null"]},"streetName":{"type":["string","null"]},"locality":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"adminDistrict":{"type":["string","null"]},"adminDistrictCode":{"type":["string","null"]},"adminDistrict2":{"type":["string","null"]},"country":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"type":{"type":["string","null"]},"confidence":{"type":["string","null"]},"matchCodes":{"type":"array"},"timeZone":{"type":["string","null"]},"utcOffset":{"type":["string","null"]}},"required":["latitude","longitude","formattedAddress","addressLine","streetNumber","streetName","locality","postalCode","adminDistrict","adminDistrictCode","adminDistrict2","country","countryCode","type","confidence","matchCodes","timeZone","utcOffset"]}}},"required":["query","utcOffsetAt","count","results"]},"example":{"query":"Space Needle, Seattle","utcOffsetAt":"2026-08-31T20:15:00.000Z","count":1,"results":[{"latitude":47.6205,"longitude":-122.3493,"formattedAddress":"Space Needle, Seattle, WA 98109, United States","addressLine":"Space Needle","streetNumber":null,"streetName":null,"locality":"Seattle","postalCode":"98109","adminDistrict":"Washington","adminDistrictCode":"WA","adminDistrict2":"King County","country":"United States","countryCode":"US","type":"PointOfInterest","confidence":"High","matchCodes":["Good"],"timeZone":"America/Los_Angeles","utcOffset":"-07:00"}]}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string","minLength":1,"pattern":".*\\S.*"},"language":{"type":"string","minLength":2,"maxLength":35,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"},"limit":{"type":"integer","minimum":1,"maximum":5},"biasLatitude":{"type":"number","minimum":-90,"maximum":90},"biasLongitude":{"type":"number","minimum":-180,"maximum":180}},"dependentRequired":{"biasLatitude":["biasLongitude"],"biasLongitude":["biasLatitude"]}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.014"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"14000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/geocode\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"query\": \"Space Needle, Seattle\",\n  \"language\": \"en-US\",\n  \"limit\": 3\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/geocode\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"query\": \"Space Needle, Seattle\",\n  \"language\": \"en-US\",\n  \"limit\": 3\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/geocode\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"14000\",\n    body: {\n  \"query\": \"Space Needle, Seattle\",\n  \"language\": \"en-US\",\n  \"limit\": 3\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/geocode/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/geocode\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"14000\",\n    body: {\n  \"query\": \"Space Needle, Seattle\",\n  \"language\": \"en-US\",\n  \"limit\": 3\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/maps/reverse-geocode":{"post":{"operationId":"maps_reverse-geocode","summary":"Reverse-Geocoding API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. ManyFish location resolver for reverse geocoding. Convert latitude and longitude into a normalized address, structured address components, IANA time zone, and current UTC offset. Paid price: $0.014. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/reverse-geocode#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/reverse-geocode#quickstart"},"tags":["maps"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["latitude","longitude"],"properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"language":{"type":"string","minLength":2,"maxLength":35,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"example":{"latitude":47.6205,"longitude":-122.3493,"language":"en-US"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"coordinates":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"]},"utcOffsetAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"count":{"type":"integer","minimum":0},"results":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"formattedAddress":{"type":["string","null"]},"addressLine":{"type":["string","null"]},"streetNumber":{"type":["string","null"]},"streetName":{"type":["string","null"]},"locality":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"adminDistrict":{"type":["string","null"]},"adminDistrictCode":{"type":["string","null"]},"adminDistrict2":{"type":["string","null"]},"country":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"type":{"type":["string","null"]},"confidence":{"type":["string","null"]},"matchCodes":{"type":"array"},"timeZone":{"type":["string","null"]},"utcOffset":{"type":["string","null"]}},"required":["latitude","longitude","formattedAddress","addressLine","streetNumber","streetName","locality","postalCode","adminDistrict","adminDistrictCode","adminDistrict2","country","countryCode","type","confidence","matchCodes","timeZone","utcOffset"]}}},"required":["coordinates","utcOffsetAt","count","results"]},"example":{"coordinates":{"latitude":47.6205,"longitude":-122.3493},"utcOffsetAt":"2026-08-31T20:15:00.000Z","count":1,"results":[{"latitude":47.6205,"longitude":-122.3493,"formattedAddress":"400 Broad St, Seattle, WA 98109, United States","addressLine":"400 Broad St","streetNumber":"400","streetName":"Broad St","locality":"Seattle","postalCode":"98109","adminDistrict":"Washington","adminDistrictCode":"WA","adminDistrict2":"King County","country":"United States","countryCode":"US","type":"Address","confidence":"High","matchCodes":["Good"],"timeZone":"America/Los_Angeles","utcOffset":"-07:00"}]}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["latitude","longitude"],"properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"language":{"type":"string","minLength":2,"maxLength":35,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.014"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"14000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/reverse-geocode\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"latitude\": 47.6205,\n  \"longitude\": -122.3493,\n  \"language\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/reverse-geocode\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"latitude\": 47.6205,\n  \"longitude\": -122.3493,\n  \"language\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/reverse-geocode\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"14000\",\n    body: {\n  \"latitude\": 47.6205,\n  \"longitude\": -122.3493,\n  \"language\": \"en-US\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/reverse-geocode/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/maps/reverse-geocode\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"14000\",\n    body: {\n  \"latitude\": 47.6205,\n  \"longitude\": -122.3493,\n  \"language\": \"en-US\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/content/html-to-markdown":{"post":{"operationId":"content_html-to-markdown","summary":"HTML-to-Markdown Converter","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Convert raw HTML already held by an agent into deterministic, clean, LLM-ready Markdown without fetching the source URL. Returns the title, byline, excerpt, Markdown, and character count. Paid price: $0.003. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/html-to-markdown#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/html-to-markdown#quickstart"},"tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["html"],"properties":{"html":{"type":"string","minLength":1,"pattern":".*\\S.*"},"sourceUrl":{"type":"string","maxLength":2048,"pattern":"^[hH][tT][tT][pP][sS]?://[^\\s]+$"}}},"example":{"html":"<article><h1>Example</h1><p>Article text.</p></article>","sourceUrl":"https://example.com/article"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"title":{"type":["string","null"]},"byline":{"type":["string","null"]},"excerpt":{"type":["string","null"]},"markdown":{"type":"string"},"markdownCharacters":{"type":"integer","minimum":0}},"required":["title","byline","excerpt","markdown","markdownCharacters"]},"example":{"title":"Example","byline":null,"excerpt":"Article text.","markdown":"# Example\n\nArticle text.","markdownCharacters":24}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["html"],"properties":{"html":{"type":"string","minLength":1,"pattern":".*\\S.*"},"sourceUrl":{"type":"string","maxLength":2048,"pattern":"^[hH][tT][tT][pP][sS]?://[^\\s]+$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.003"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"3000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/html-to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"html\": \"<article><h1>Example</h1><p>Article text.</p></article>\",\n  \"sourceUrl\": \"https://example.com/article\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/html-to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"html\": \"<article><h1>Example</h1><p>Article text.</p></article>\",\n  \"sourceUrl\": \"https://example.com/article\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/html-to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"3000\",\n    body: {\n  \"html\": \"<article><h1>Example</h1><p>Article text.</p></article>\",\n  \"sourceUrl\": \"https://example.com/article\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/html-to-markdown/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/html-to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"3000\",\n    body: {\n  \"html\": \"<article><h1>Example</h1><p>Article text.</p></article>\",\n  \"sourceUrl\": \"https://example.com/article\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/content/url-to-markdown":{"post":{"operationId":"content_url-to-markdown","summary":"URL-to-Markdown Converter","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Convert a public webpage URL to clean Markdown for RAG and agent research. Returns article metadata and truncation status. Static or server-rendered HTML only; no JavaScript execution. Paid price: $0.006. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/url-to-markdown#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/url-to-markdown#quickstart"},"tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[hH][tT][tT][pP][sS]?://[^\\s]+$"}}},"example":{"url":"https://example.com/article"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"requestedUrl":{"type":"string"},"finalUrl":{"type":"string"},"title":{"type":["string","null"]},"byline":{"type":["string","null"]},"excerpt":{"type":["string","null"]},"markdown":{"type":"string"},"markdownCharacters":{"type":"integer","minimum":0},"truncated":{"type":"boolean"},"retrievedAt":{"type":"string"}},"required":["requestedUrl","finalUrl","title","byline","excerpt","markdown","markdownCharacters","truncated","retrievedAt"]},"example":{"requestedUrl":"https://example.com/article","finalUrl":"https://example.com/article","title":"Example","byline":null,"excerpt":"Article text.","markdown":"# Example\n\nArticle text.","markdownCharacters":24,"truncated":false,"retrievedAt":"2026-09-02T20:00:00.000Z"}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^[hH][tT][tT][pP][sS]?://[^\\s]+$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.006"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"6000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/url-to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"url\": \"https://example.com/article\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/url-to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"url\": \"https://example.com/article\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/url-to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"6000\",\n    body: {\n  \"url\": \"https://example.com/article\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/url-to-markdown/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/url-to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"6000\",\n    body: {\n  \"url\": \"https://example.com/article\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/web/answer":{"post":{"operationId":"web_answer","summary":"Web Answer API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Search the live web once and return a concise answer with source citations. Supports country context and an optional allowlist of source domains. Paid price: $0.035. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/answer#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/answer#quickstart"},"tags":["web"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["question"],"properties":{"question":{"type":"string","minLength":10,"maxLength":1000,"pattern":".*\\S.*"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"allowedDomains":{"type":"array","maxItems":5,"uniqueItems":true,"items":{"type":"string","maxLength":253,"pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$"}}}},"example":{"question":"What changed in the latest Node.js 22 release?","country":"US","allowedDomains":["nodejs.org"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["answer","citations","searchPerformed","asOf"],"properties":{"answer":{"type":"string","minLength":1},"citations":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["title","url","startIndex","endIndex"],"properties":{"title":{"type":"string"},"url":{"type":"string","pattern":"^[hH][tT][tT][pP][sS]?://[^\\s]+$"},"startIndex":{"type":["integer","null"],"minimum":0},"endIndex":{"type":["integer","null"],"minimum":0}}}},"searchPerformed":{"const":true},"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"}}},"example":{"answer":"Node.js 22 includes recent security and reliability updates.","citations":[{"title":"Node.js releases","url":"https://nodejs.org/en/blog/release/","startIndex":0,"endIndex":58}],"searchPerformed":true,"asOf":"2026-09-02T20:00:00.000Z"}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["question"],"properties":{"question":{"type":"string","minLength":10,"maxLength":1000,"pattern":".*\\S.*"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"allowedDomains":{"type":"array","maxItems":5,"uniqueItems":true,"items":{"type":"string","maxLength":253,"pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$"}}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.035"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"35000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/web/answer\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"question\": \"What changed in the latest Node.js 22 release?\",\n  \"country\": \"US\",\n  \"allowedDomains\": [\n    \"nodejs.org\"\n  ]\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/web/answer\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"question\": \"What changed in the latest Node.js 22 release?\",\n  \"country\": \"US\",\n  \"allowedDomains\": [\n    \"nodejs.org\"\n  ]\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/web/answer\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"35000\",\n    body: {\n  \"question\": \"What changed in the latest Node.js 22 release?\",\n  \"country\": \"US\",\n  \"allowedDomains\": [\n    \"nodejs.org\"\n  ]\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/answer/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/web/answer\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"35000\",\n    body: {\n  \"question\": \"What changed in the latest Node.js 22 release?\",\n  \"country\": \"US\",\n  \"allowedDomains\": [\n    \"nodejs.org\"\n  ]\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/crypto/token-verdict":{"post":{"operationId":"crypto_tokenVerdict","summary":"Token Verdict API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Analyze a selected Base token pool: USD liquidity, 24h volume, price change, rule-based observations and an AI summary with sources. For agent market reports, not contract-security checks or investment advice. Paid price: $0.015. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/token-verdict#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/token-verdict#quickstart"},"tags":["crypto"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["tokenAddress"],"properties":{"tokenAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","not":{"const":"0x0000000000000000000000000000000000000000"},"description":"A Base ERC-20 contract address, not the native ETH sentinel."}}},"example":{"tokenAddress":"0x4200000000000000000000000000000000000006"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","description":"The response example is illustrative synthetic data, not a live token quote or assessment.","additionalProperties":false,"required":["token","pool","metrics","signals","rulesVersion","summary","provenance","limitations"],"properties":{"token":{"type":"object","additionalProperties":false,"required":["address","name","symbol"],"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"name":{"type":["string","null"],"maxLength":128},"symbol":{"type":["string","null"],"maxLength":64}}},"pool":{"type":"object","additionalProperties":false,"required":["address","dex","selectionMethod","createdAt"],"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"dex":{"type":"string","minLength":1,"maxLength":128},"selectionMethod":{"const":"highest_liquidity"},"createdAt":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"}}},"metrics":{"type":"object","additionalProperties":false,"required":["priceUsd","liquidityUsd","volume24hUsd","priceChange24hPercent","buys24h","sells24h","poolAgeHours"],"properties":{"priceUsd":{"type":"string","maxLength":128,"pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$"},"liquidityUsd":{"type":"number","exclusiveMinimum":0},"volume24hUsd":{"type":["number","null"],"minimum":0},"priceChange24hPercent":{"type":["number","null"]},"buys24h":{"type":["integer","null"],"minimum":0},"sells24h":{"type":["integer","null"],"minimum":0},"poolAgeHours":{"type":["number","null"],"minimum":0}}},"rulesVersion":{"const":"v1"},"signals":{"type":"array","maxItems":4,"items":{"type":"object","additionalProperties":false,"required":["code","description"],"properties":{"code":{"enum":["LOW_LIQUIDITY","NEW_POOL","LARGE_PRICE_MOVE","INCOMPLETE_DATA"]},"description":{"type":"string","minLength":1,"maxLength":512}}}},"summary":{"type":"string","minLength":1,"maxLength":1200},"provenance":{"type":"object","additionalProperties":false,"required":["provider","url","fetchedAt","sourceUpdatedAt"],"properties":{"provider":{"const":"dexscreener"},"url":{"type":"string","pattern":"^https://dexscreener\\.com/base/0x[0-9a-f]{40}$"},"fetchedAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$"},"sourceUpdatedAt":{"type":"null"}}},"limitations":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"string","minLength":1,"maxLength":512}}}},"example":{"token":{"address":"0x1111111111111111111111111111111111111111","name":"Example Token","symbol":"EXAMPLE"},"pool":{"address":"0x2222222222222222222222222222222222222222","dex":"example-dex","selectionMethod":"highest_liquidity","createdAt":"2026-01-01T00:00:00.000Z"},"metrics":{"priceUsd":"0.002","liquidityUsd":5000,"volume24hUsd":1000,"priceChange24hPercent":-5,"buys24h":10,"sells24h":12,"poolAgeHours":48},"rulesVersion":"v1","signals":[{"code":"LOW_LIQUIDITY","description":"The selected pool has less than $10,000 in reported liquidity."}],"summary":"The selected pool has limited liquidity and a reported 5% decline over 24 hours. This is a market observation, not a security assessment or trading recommendation.","provenance":{"provider":"dexscreener","url":"https://dexscreener.com/base/0x2222222222222222222222222222222222222222","fetchedAt":"2026-01-03T00:00:00.000Z","sourceUpdatedAt":null},"limitations":["Metrics describe one selected pool, not the entire token market.","The provider's underlying data update time is unknown."]}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["tokenAddress"],"properties":{"tokenAddress":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","not":{"const":"0x0000000000000000000000000000000000000000"},"description":"A Base ERC-20 contract address, not the native ETH sentinel."}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"422":{"description":"No supported market data is available for the token","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.015"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"15000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/crypto/token-verdict\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"tokenAddress\": \"0x4200000000000000000000000000000000000006\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/crypto/token-verdict\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"tokenAddress\": \"0x4200000000000000000000000000000000000006\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/crypto/token-verdict\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"15000\",\n    body: {\n  \"tokenAddress\": \"0x4200000000000000000000000000000000000006\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/token-verdict/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/crypto/token-verdict\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"15000\",\n    body: {\n  \"tokenAddress\": \"0x4200000000000000000000000000000000000006\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/content/pdf-to-text":{"post":{"operationId":"content_pdf-to-text","summary":"PDF-to-Text Converter","description":"This price exceeds the $0.050 trial grant and requires full payment. Extract printed and handwritten text from a supplied PDF using OCR. Paid price: $0.120. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-text.","externalDocs":{"description":"Request examples and access instructions","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-text"},"tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["pdfBase64"],"properties":{"pdfBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"pages":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[1-9]\\d*(?:-[1-9]\\d*)?(?:,[1-9]\\d*(?:-[1-9]\\d*)?)*$"},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"example":{"pdfBase64":"JVBERi0xLjQKJcTl8uXrCg==","pages":"1-5","locale":"en-US"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text","textCharacters","pageCount","processedPages"],"properties":{"text":{"type":"string"},"textCharacters":{"type":"integer","minimum":0},"pageCount":{"type":"integer","minimum":0},"processedPages":{"type":"array","items":{"type":"integer","minimum":1}}}},"example":{"text":"Example document text.","textCharacters":22,"pageCount":1,"processedPages":[1]}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["pdfBase64"],"properties":{"pdfBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"pages":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[1-9]\\d*(?:-[1-9]\\d*)?(?:,[1-9]\\d*(?:-[1-9]\\d*)?)*$"},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.120"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"120000","coveredByInitialGrant":false},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-text\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-text\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// This quote exceeds the initial grant; this sample stops without paying.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-text\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"120000\",\n    body: {\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-text/strict-trial.js\" -o trial.js\n// This price exceeds the initial grant; trial-only access will stop without paying.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-text\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"120000\",\n    body: {\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/content/pdf-to-markdown":{"post":{"operationId":"content_pdf-to-markdown","summary":"PDF-to-Markdown Converter","description":"This price exceeds the $0.050 trial grant and requires full payment. Convert a supplied PDF into Markdown while preserving document structure and tables. Paid price: $0.760. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-markdown.","externalDocs":{"description":"Request examples and access instructions","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-markdown"},"tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["pdfBase64"],"properties":{"pdfBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"pages":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[1-9]\\d*(?:-[1-9]\\d*)?(?:,[1-9]\\d*(?:-[1-9]\\d*)?)*$"},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"example":{"pdfBase64":"JVBERi0xLjQKJcTl8uXrCg==","pages":"1-5","locale":"en-US"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["markdown","markdownCharacters","pageCount","processedPages"],"properties":{"markdown":{"type":"string"},"markdownCharacters":{"type":"integer","minimum":0},"pageCount":{"type":"integer","minimum":0},"processedPages":{"type":"array","items":{"type":"integer","minimum":1}}}},"example":{"markdown":"# Example\n\nDocument text.","markdownCharacters":25,"pageCount":1,"processedPages":[1]}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["pdfBase64"],"properties":{"pdfBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"pages":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[1-9]\\d*(?:-[1-9]\\d*)?(?:,[1-9]\\d*(?:-[1-9]\\d*)?)*$"},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.760"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"760000","coveredByInitialGrant":false},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// This quote exceeds the initial grant; this sample stops without paying.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"760000\",\n    body: {\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-markdown/strict-trial.js\" -o trial.js\n// This price exceeds the initial grant; trial-only access will stop without paying.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"760000\",\n    body: {\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/content/pdf-to-json":{"post":{"operationId":"content_pdf-to-json","summary":"PDF-to-JSON Converter","description":"This price exceeds the $0.050 trial grant and requires full payment. Extract normalized pages, paragraphs, tables, sections, and geometry from a supplied PDF. Paid price: $0.760. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-json.","externalDocs":{"description":"Request examples and access instructions","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-json"},"tags":["content"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["pdfBase64"],"properties":{"pdfBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"pages":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[1-9]\\d*(?:-[1-9]\\d*)?(?:,[1-9]\\d*(?:-[1-9]\\d*)?)*$"},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"example":{"pdfBase64":"JVBERi0xLjQKJcTl8uXrCg==","pages":"1-5","locale":"en-US"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["content","contentCharacters","pageCount","processedPages","pages","paragraphs","tables","sections"],"properties":{"content":{"type":"string"},"contentCharacters":{"type":"integer","minimum":0},"pageCount":{"type":"integer","minimum":0},"processedPages":{"type":"array","items":{"type":"integer","minimum":1}},"pages":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["pageNumber","lines","selectionMarks"],"properties":{"pageNumber":{"type":"integer","minimum":1},"angle":{"type":"number"},"width":{"type":"number","minimum":0},"height":{"type":"number","minimum":0},"unit":{"enum":["pixel","inch"]},"lines":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["content","spans"],"properties":{"content":{"type":"string"},"polygon":{"type":"array","items":{"type":"number"}},"spans":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["offset","length"],"properties":{"offset":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0}}}}}}},"selectionMarks":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["state","confidence","span"],"properties":{"state":{"enum":["selected","unselected"]},"confidence":{"type":"number","minimum":0,"maximum":1},"polygon":{"type":"array","items":{"type":"number"}},"span":{"type":"object","additionalProperties":false,"required":["offset","length"],"properties":{"offset":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0}}}}}}}}},"paragraphs":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["content","boundingRegions","spans"],"properties":{"role":{"type":"string"},"content":{"type":"string"},"boundingRegions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["pageNumber"],"properties":{"pageNumber":{"type":"integer","minimum":1},"polygon":{"type":"array","items":{"type":"number"}}}}},"spans":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["offset","length"],"properties":{"offset":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0}}}}}}},"tables":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["rowCount","columnCount","boundingRegions","cells"],"properties":{"rowCount":{"type":"integer","minimum":1},"columnCount":{"type":"integer","minimum":1},"boundingRegions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["pageNumber"],"properties":{"pageNumber":{"type":"integer","minimum":1},"polygon":{"type":"array","items":{"type":"number"}}}}},"cells":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["rowIndex","columnIndex","content","boundingRegions","spans"],"properties":{"kind":{"type":"string"},"rowIndex":{"type":"integer","minimum":0},"columnIndex":{"type":"integer","minimum":0},"rowSpan":{"type":"integer","minimum":1},"columnSpan":{"type":"integer","minimum":1},"content":{"type":"string"},"boundingRegions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["pageNumber"],"properties":{"pageNumber":{"type":"integer","minimum":1},"polygon":{"type":"array","items":{"type":"number"}}}}},"spans":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["offset","length"],"properties":{"offset":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0}}}}}}}}}},"sections":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["spans","elements"],"properties":{"spans":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["offset","length"],"properties":{"offset":{"type":"integer","minimum":0},"length":{"type":"integer","minimum":0}}}},"elements":{"type":"array","items":{"type":"string"}}}}}}},"example":{"content":"Example document text.","contentCharacters":22,"pageCount":1,"processedPages":[1],"pages":[{"pageNumber":1,"lines":[],"selectionMarks":[]}],"paragraphs":[],"tables":[],"sections":[]}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["pdfBase64"],"properties":{"pdfBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"pages":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[1-9]\\d*(?:-[1-9]\\d*)?(?:,[1-9]\\d*(?:-[1-9]\\d*)?)*$"},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.760"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"760000","coveredByInitialGrant":false},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-json\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-json\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// This quote exceeds the initial grant; this sample stops without paying.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-json\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"760000\",\n    body: {\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/pdf-to-json/strict-trial.js\" -o trial.js\n// This price exceeds the initial grant; trial-only access will stop without paying.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/content/pdf-to-json\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"760000\",\n    body: {\n  \"pdfBase64\": \"JVBERi0xLjQKJcTl8uXrCg==\",\n  \"pages\": \"1-5\",\n  \"locale\": \"en-US\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/image/ocr":{"post":{"operationId":"image_ocr","summary":"Image OCR API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Extract printed and handwritten text from a supplied image using OCR. Paid price: $0.017. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/ocr#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/ocr#quickstart"},"tags":["image"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"example":{"imageBase64":"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0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GKdGsm8uKW9UJsnL3AzdpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==","contentType":"image/png","locale":"en-US"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["text","textCharacters","lines","image"],"properties":{"text":{"type":"string"},"textCharacters":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["text","polygon"],"properties":{"text":{"type":"string"},"polygon":{"type":"array","items":{"type":"number"},"minItems":8}}}},"image":{"type":"object","additionalProperties":false,"required":["contentType","width","height"],"properties":{"contentType":{"enum":["image/jpeg","image/png"]},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}}}},"example":{"text":"HELLO","textCharacters":5,"lines":[{"text":"HELLO","polygon":[70,40,180,40,180,75,70,75]}],"image":{"contentType":"image/png","width":200,"height":120}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.017"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"17000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/ocr\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/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FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/ocr\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uL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hHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/ocr\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"17000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb2vrzY2NgmJibR0dH2vbxRUVGKiormQT3+9fV8fHzu7u41NTVjKklsAAAACXBIWXMAAAsTAAALEwEAmpwYAAADW0lEQVR42u2a9VvbQByHw1hJGWN0K1Cgw911OIMx3G24DObu7u7u7u7u/o9tvTSkEpIr2/I89zyf96d8P80dfZ/0ktwdHAcAAAAAAAAAAAAAAAAAAAAAAIBRkgcDY/Oby8qaS49FByWzamEI2hL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n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/ocr/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/ocr\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"17000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/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ECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/image/analyze":{"post":{"operationId":"image_analyze","summary":"Image Analysis API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Return a caption, visual tags, and located objects for a supplied image. Paid price: $0.016. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/analyze#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/analyze#quickstart"},"tags":["image"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"minimumConfidence":{"type":"number","minimum":0,"maximum":1,"default":0.5}}},"example":{"imageBase64":"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb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nd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==","contentType":"image/png","minimumConfidence":0.5}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["caption","tags","objects","language","image"],"properties":{"caption":{"type":"object","additionalProperties":false,"required":["text","confidence"],"properties":{"text":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1}}},"tags":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","confidence"],"properties":{"name":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1}}}},"objects":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","boundingBox","tags"],"properties":{"id":{"type":"string","minLength":1},"boundingBox":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":0},"height":{"type":"integer","minimum":0}}},"tags":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","confidence"],"properties":{"name":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1}}},"minItems":1}}}},"language":{"const":"en"},"image":{"type":"object","additionalProperties":false,"required":["contentType","width","height"],"properties":{"contentType":{"enum":["image/jpeg","image/png"]},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}}}},"example":{"caption":{"text":"A red circle and the word hello on a white background.","confidence":0.92},"tags":[{"name":"text","confidence":0.97}],"objects":[],"language":"en","image":{"contentType":"image/png","width":200,"height":120}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"minimumConfidence":{"type":"number","minimum":0,"maximum":1,"default":0.5}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.016"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"16000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/analyze\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaW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iX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/analyze\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb2vr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PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/analyze\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"16000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR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tGKdGsm8uKW9UJsnL3AzdpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/analyze/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/analyze\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"16000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3w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ZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/image/caption":{"post":{"operationId":"image_caption","summary":"Image Caption API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Generate one English sentence describing a supplied image. Paid price: $0.009. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/caption#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/caption#quickstart"},"tags":["image"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]}}},"example":{"imageBase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PE/WqzusiBCgZEinkKEpzb3fa0MEMsg0mpI8dFnvYIJ10nx0/tOkkh2VGZr9WZeqRnf//xQ5uCKT3e81Tsdmo4Rm9hnFhOIKUbOdbp7RFO8iDH4+06cSeZl1PnutbhxtN7PlDdsQboRDINGoq0nbVr7v+1QF0kiKekSjuRoasO7fWns1VFdtGKdGsm8uKW9UJsnL3AzdpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==","contentType":"image/png"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["caption","language","image"],"properties":{"caption":{"type":"object","additionalProperties":false,"required":["text","confidence"],"properties":{"text":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1}}},"language":{"const":"en"},"image":{"type":"object","additionalProperties":false,"required":["contentType","width","height"],"properties":{"contentType":{"enum":["image/jpeg","image/png"]},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}}}},"example":{"caption":{"text":"A red circle and the word hello on a white background.","confidence":0.92},"language":"en","image":{"contentType":"image/png","width":200,"height":120}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.009"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"9000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/caption\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+P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dpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/caption\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trb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f7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/caption\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"9000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb2vrzY2NgmJibR0dH2vbxRUVGKiormQT3+9fV8fHzu7u41NTVjKklsAAAACXBIWXMAAAsTAAALEwEAmpwYAAADW0lEQVR42u2a9VvbQByHw1hJGWN0K1Cgw911OIMx3G24DObu7u7u7u7u/o9tvTSkEpIr2/I89zyf96d8P80dfZ/0ktwdHAcAAAAAAAAAAAAAAAAAAAAAAIBRkgcDY/Oby8qaS49FByWz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,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/caption/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/caption\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"9000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKz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1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/image/objects":{"post":{"operationId":"image_objects","summary":"Image Objects API","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Locate objects in a supplied image with tags, confidence scores, and bounding boxes. Paid price: $0.007. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/objects#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/objects#quickstart"},"tags":["image"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"minimumConfidence":{"type":"number","minimum":0,"maximum":1,"default":0.5}}},"example":{"imageBase64":"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb2vrzY2NgmJibR0dH2vbxRUVGKiorm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ysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==","contentType":"image/png","minimumConfidence":0.5}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["objects","image"],"properties":{"objects":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","boundingBox","tags"],"properties":{"id":{"type":"string","minLength":1},"boundingBox":{"type":"object","additionalProperties":false,"required":["x","y","width","height"],"properties":{"x":{"type":"integer","minimum":0},"y":{"type":"integer","minimum":0},"width":{"type":"integer","minimum":0},"height":{"type":"integer","minimum":0}}},"tags":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","confidence"],"properties":{"name":{"type":"string","minLength":1},"confidence":{"type":"number","minimum":0,"maximum":1}}},"minItems":1}}}},"image":{"type":"object","additionalProperties":false,"required":["contentType","width","height"],"properties":{"contentType":{"enum":["image/jpeg","image/png"]},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}}}},"example":{"objects":[],"image":{"contentType":"image/png","width":200,"height":120}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"minimumConfidence":{"type":"number","minimum":0,"maximum":1,"default":0.5}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.007"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"7000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/objects\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb2vrzY2NgmJibR0dH2vb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2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/objects\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.string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aF6FO2x43OBVWcPE/WqzusiBCgZEinkKEpzb3fa0MEMsg0mpI8dFnvYIJ10nx0/tOkkh2VGZr9WZeqRnf//xQ5uCKT3e81Tsdmo4Rm9hnFhOIKUbOdbp7RFO8iDH4+06cSeZl1PnutbhxtN7PlDdsQboRDINGoq0nbVr7v+1QF0kiKekSjuRoasO7fWns1VFdtGKdGsm8uKW9UJsnL3AzdpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/objects\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"7000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgY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+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/objects/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/objects\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"7000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcXFzqYF3ymZZVVVVOTk75+fn85eSysrI5OTlra2vd3d32u7odHR1PT0/6+vrymZe6urrnRULs7Oz85eXscG3e3t6enp5eXl7Q0ND2vLvJycn7+/v09PRCQkLwjIp0dHQ0NDSmpqb2vrzY2NgmJibR0dH2vbxRUVGKiormQT3+9fV8fHzu7u41NTVjKklsAAAACXBIWXMAAAsTAAALEwEAmpwYAAADW0lEQVR42u2a9VvbQByHw1hJGWN0K1Cgw911OIMx3G24DObu7u7u7u7u/o9tvTSkEpIr2/I89zyf96d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bbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"minimumConfidence\": 0.5\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}},"/api/v1/image/to-markdown":{"post":{"operationId":"image_to-markdown","summary":"Image-to-Markdown Converter","description":"Try with $0.050 in free shared credit once per wallet. No deposit or on-chain transaction; wallet sign-in required. Credit, daily budget and availability apply. Convert a document-like image into Markdown while preserving reading order and tables. Paid price: $0.040. Docs: https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/to-markdown#quickstart.","externalDocs":{"description":"Start with the trial-only quickstart; it never pays","url":"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/to-markdown#quickstart"},"tags":["image"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"example":{"imageBase64":"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++v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W9UJsnL3AzdpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==","contentType":"image/png","locale":"en-US"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["markdown","markdownCharacters","image"],"properties":{"markdown":{"type":"string"},"markdownCharacters":{"type":"integer","minimum":0},"image":{"type":"object","additionalProperties":false,"required":["contentType","width","height"],"properties":{"contentType":{"enum":["image/jpeg","image/png"]},"width":{"type":"integer","minimum":1},"height":{"type":"integer","minimum":1}}}}},"example":{"markdown":"HELLO","markdownCharacters":5,"image":{"contentType":"image/png","width":200,"height":120}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"400":{"description":"Invalid business request or malformed trial proof","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"401":{"description":"Invalid, expired, wrong-resource, or replayed trial proof. Do not automatically retry or pay.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"402":{"description":"Start with the trial-only quickstart when this quote is covered by the initial grant. Unsigned requests explain the free-credit option or the specific denial and may link to a quickstart. The same extensions['seller-trial'].info and nextStep appear in the body and header. For manual integration, base64-decode the canonical PAYMENT-REQUIRED header for payment requirements and extensions['sign-in-with-x']. A trial challenge requires a wallet signature, not payment. Empty requests only discover the API. Explicit payment rejection and settlement failures retain their original SDK body, which may be empty.","content":{"application/json":{"schema":{"description":"Unsigned requests receive onboarding guidance. Explicit payment rejection and settlement failures retain their original SDK error body, which may be empty.","anyOf":[{"type":"object","additionalProperties":false,"required":["message","resource","method","documentationUrl","openapiUrl"],"properties":{"message":{"type":"string"},"resource":{"type":"string","description":"The public API URL or same-origin path."},"method":{"const":"POST"},"requestExample":{"type":"object","additionalProperties":false,"required":["imageBase64","contentType"],"properties":{"imageBase64":{"type":"string","minLength":8,"maxLength":13981016,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"},"contentType":{"enum":["image/jpeg","image/png"]},"locale":{"type":"string","minLength":2,"maxLength":32,"pattern":"^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"}}},"documentationUrl":{"type":"string"},"openapiUrl":{"type":"string"},"quickstartUrl":{"type":"string","description":"Trial-only quickstart for a covered unsigned request. Absent for denials, unavailable trials, and quotes above the initial grant."},"extensions":{"type":"object","additionalProperties":false,"required":["seller-trial"],"properties":{"seller-trial":{"type":"object","required":["info"],"properties":{"info":{"type":"object","description":"The same seller-trial info as the canonical PAYMENT-REQUIRED header. No wallet proof or SIWX nonce is copied into this body.","required":["status","quotedAmountAtomic","coveredByInitialGrant","nextStep"],"properties":{"status":{"enum":["discovery_probe","challenge","insufficient_balance","daily_budget_exhausted","unavailable"]},"quotedAmountAtomic":{"type":"string","pattern":"^[1-9][0-9]*$"},"coveredByInitialGrant":{"type":"boolean"},"balanceAtomic":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"nextStep":{"type":"object","required":["action","description"],"properties":{"action":{"type":"string"},"description":{"type":"string"}}}}}}}}}}},{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}},{"type":"object","maxProperties":0}]}}},"headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 payment requirements","schema":{"type":"string"}},"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"502":{"description":"Upstream provider failure","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"503":{"description":"Service unavailable, including authenticated trial accounting failure (TRIAL_UNAVAILABLE). Do not automatically retry or pay; a reservation may exist.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}},"504":{"description":"Upstream operation timed out","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}},"headers":{"X-Access-Mode":{"description":"trial only when a trial execution was admitted; no payment settlement is created.","schema":{"type":"string","const":"trial"}},"X-Trial-Status":{"description":"Trial challenge, denial, or accounting outcome. charged means service credit was consumed, not a payment. accounting_uncertain means do not retry or pay.","schema":{"type":"string"}},"X-Trial-Balance-Atomic":{"description":"Remaining virtual service credit in integer micro-USD, when known. Not a USDC balance.","schema":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"X-Trial-Accounting-Status":{"description":"When present, confirmed or uncertain. A business result with uncertain accounting must not be automatically retried or paid for.","schema":{"type":"string","enum":["confirmed","uncertain"]}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.040"}},"parameters":[{"name":"SIGN-IN-WITH-X","in":"header","required":false,"description":"Optional trial authentication, not payment. First submit this operation's valid JSON example without payment or proof headers, then sign the returned SIWX challenge and resend the identical URL, method, and body. Never combine with payment headers when requesting trial-only access.","schema":{"type":"string","contentEncoding":"base64"}}],"x-seller-trial":{"eligible":true,"quotedAmountAtomic":"40000","coveredByInitialGrant":true},"x-codeSamples":[{"lang":"JavaScript","label":"Start here: official SDK, trial only (never pays)","source":"// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkL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oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Official SDK: Node.js trial-only script","source":"// Node.js 22+ ES module. Use an existing EOA key locally; never send it to the seller.\n// npm init -y && npm pkg set type=module && npm install @x402/extensions viem\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\nconst existingSigner = privateKeyToAccount(privateKey);\n// npm install @x402/extensions\n// existingSigner is your EVM EOA signer with address and signMessage({ message }).\n// Use plain fetch, never a payment-wrapped fetch, for trial-only access.\nimport { wrapFetchWithSIWx } from \"@x402/extensions/sign-in-with-x\";\n\nconst trialFetch = wrapFetchWithSIWx(fetch, existingSigner);\nconst response = await trialFetch(\"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/to-markdown\", {\n  method: \"POST\",\n  headers: { \"content-type\": \"application/json\", accept: \"application/json\" },\n  body: JSON.stringify({\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGhaWlqTk5P2uLcaGhrFxcWFhYX39/dFRUW3t7fmQj/ue3ji4uIwMDBpaWmioqLb29vuenj3wL8iIiLqX1zNzc1UVFTmREDwiod/f38/Pz94eHixsbHtdXJqamqjo6P2u7nc3NxjY2P3wcBcX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rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n}),\n  redirect: \"error\",\n  signal: AbortSignal.timeout(30_000),\n});\nif (!response.ok) throw new Error(`Trial stopped: HTTP ${response.status}. Do not automatically retry or pay.`);\nif (response.headers.get(\"x-access-mode\") !== \"trial\" ||\n    response.headers.get(\"x-trial-status\") !== \"charged\" ||\n    response.headers.get(\"x-trial-accounting-status\") !== \"confirmed\" ||\n    response.headers.has(\"payment-response\") || response.headers.has(\"x-payment-response\")) {\n  throw new Error(\"Trial accounting is unconfirmed. Do not repeat this request or pay.\");\n}\nconsole.log(await response.json());\n// No payment signer, paid fallback, or application retry loop is installed.\n"},{"lang":"JavaScript","label":"Optional strict helper: validates quote, challenge and accounting","source":"// Download from the trusted seller origin: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// existingSigner is your existing EVM EOA signer: address and signMessage({ message }).\n// No deposit, payment signing, or private-key export is needed.\n// Execution requires remaining credit, daily budget, and API availability.\nimport { fetchTrial } from \"./trial-client.js\";\nconst outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"40000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZA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0/tOkkh2VGZr9WZeqRnf//xQ5uCKT3e81Tsdmo4Rm9hnFhOIKUbOdbp7RFO8iDH4+06cSeZl1PnutbhxtN7PlDdsQboRDINGoq0nbVr7v+1QF0kiKekSjuRoasO7fWns1VFdtGKdGsm8uKW9UJsnL3AzdpDnZrH91BakSSzqyIzJ4p8cklktfDdv6RbinVdgtQ+FZFBnhqjqyKTHBpQimz4KLS+JJR91aRcpSISSC9SrpFIKolM6WLtS+qcrcoisfQiYRqJbCfRE+lRM48Ejcoi8+lFSmVFer2tJDqJdIkfec91RWQbiXZIwUoSXFMWCacXmSIr4oD8XcvXBZECLxJlSUmG7PV1IIReJFQbEWu3j6SkkQQxrIn0CU06pUQY7W9Z+2ktEZrslJI5wlNJWSSfXiROVmStjxWdk0ir+JHPS1cG+0ISxUtBHQkuMHf7PUyiDCnoJ0HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n},\n    signer: existingSigner,\n  });\nconsole.log(JSON.stringify(outcome.result, null, 2));\n// A rejected promise stops this attempt. Do not automatically retry or pay.\n"},{"lang":"JavaScript","label":"Node.js trial-only script (never pays)","source":"// Node.js 22+ ES module: save as trial.js, supply an existing EOA's TRIAL_PRIVATE_KEY locally, then node trial.js.\n// Setup in a new project directory: npm init -y && npm pkg set type=module && npm install viem\n// Download the maintained helper: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/assets/trial-client.js\" -o trial-client.js\n// Download this example: curl --fail \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/apis/to-markdown/strict-trial.js\" -o trial.js\n// The initial grant can cover this quote, subject to remaining credit and availability.\nimport { fetchTrial, TrialClientError } from \"./trial-client.js\";\nimport { privateKeyToAccount } from \"viem/accounts\";\nconst privateKey = process.env.TRIAL_PRIVATE_KEY;\nif (!/^0x[0-9a-fA-F]{64}$/.test(privateKey ?? \"\")) throw new Error(\"Set an existing EOA's TRIAL_PRIVATE_KEY locally.\");\ntry {\n  const outcome = await fetchTrial({\n    url: \"https://manyfish-seller.redcliff-d7368db1.westus2.azurecontainerapps.io/api/v1/image/to-markdown\",\n    network: \"eip155:8453\", quotedAmountAtomic: \"40000\",\n    body: {\n  \"imageBase64\": \"iVBORw0KGgoAAAANSUhEUgAAAMgAAAB4CAMAAACATE3ZAAACTFBMVEX///82Njbw8PD4+PiAgIC8vLyamprlOTURERGwsLAcHBwVFRVycnKQkJDW1tbf39///v7Pz89QUFD4ycitra19fX0TExMYGBja2trxlZP4xsX+9/e4uLjx8fHmPjrmPjvtdnTnR0P3v77mQz++vr7xlpQ+Pj7tdHHpWVXAwMDsb2x6enrmQDz+9vX8/Pynp6fscm/g4OCSkpLqXVrLy8vnSUX9/f0SEhLynJrqXlvpV1T+/v774+Lp6en74uLsbWr4x8b2ubjpWFUUFBTmPTnxl5X75OPufHn4yMcqKiojIyPnRUGHh4fwi4jxmJakpKT3wsHnRkLmPztISEjz8/Ozs7PufnusrKzl5eUzMzPufXtlZWUXFxfm5uZYWFjqXFlDQ0P3xsTr6+v3v71nZ2egoKDZ2dknJyfpV1NgYGAZGRnzo6GEhIT29vZERES2trbh4eEvLy9oaGha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HiX85yJRo0EhHu40uH62ATCZb9o5df7V5R4oVBEiXW64W/ozK/Sm6h9fhm1kiEe0Wy6uXWKVYvKX+ovf5W0oq0u/wav2LsMAGSSIyUDoki/lJ2l+OickhY43Gf4075Cc/HmiI1kZLR/rJcmY/oJ0siNgSIIjb4/TlxsVjcNInT3Sj1qe45Oo88g3Yi2W8cQtM7ikl7BJ1IE6edCMed2GOb/cqiWkZJG+Vy0P8U4dq8Y/ytV+NiRwrdelBhpLpH7WXt19t+xnd4PL7y3J2+xTN1EUa2Fs6reeSysq1Qr+zxmp2dnkWKGz0sbb1F3Btx6+0kW5uIFQ/lPdIeMLeveybPWWNvE8cghqruJLtF0nYjk/8wYMFsLA+LCw8JCY8LazCaOQAAAAAAAAAAAAAAAAAAAAAAAGCU/AbbdLXes7JF3QAAAABJRU5ErkJggg==\",\n  \"contentType\": \"image/png\",\n  \"locale\": \"en-US\"\n},\n    signer: privateKeyToAccount(privateKey),\n  });\n  console.log(JSON.stringify(outcome.result, null, 2));\n  console.log(\"Trial balance (micro-USD):\", outcome.balanceAtomic ?? \"unknown\");\n} catch (error) {\n  console.error(error instanceof TrialClientError\n    ? `${error.code}: ${error.message} Execution: ${error.execution}; accounting: ${error.accountingStatus}.`\n    : \"The trial could not be started safely. Stop without retrying or paying.\");\n  process.exitCode = 1;\n}\n"}]}}}}