YourAITools Credits (prepaid packs) API

The Credits (prepaid packs) API from YourAITools — 10 operation(s) for credits (prepaid packs).

GitHub OpenAPI

Operations 15

0 of 15 operations are conformant: apis.io called them with no credentials and the responses matched this contract; 2 more answered but could not be checked against a schema. Checked 2026-11-12. how this works · status file

GET /credits/v1/pack/sample Sample pack: $0.005 of credits (try the flow end to end): mints a new API key… #
POST /credits/v1/pack/sample Sample pack: $0.005 of credits (try the flow end to end): mints a new API key… #
GET /credits/v1/pack/1 $1 pack: $1.00 of credits: mints a new API key (shown once) #
POST /credits/v1/pack/1 $1 pack: $1.00 of credits: mints a new API key (shown once) #
GET /credits/v1/pack/5 $5 pack: $5.50 of credits (10% bonus): mints a new API key (shown once) #
POST /credits/v1/pack/5 $5 pack: $5.50 of credits (10% bonus): mints a new API key (shown once) #
GET /credits/v1/topup/1 Top up an existing key by $1.00 of credits #
POST /credits/v1/topup/1 Top up an existing key by $1.00 of credits #
GET /credits/v1/topup/5 Top up an existing key by $5.50 of credits #
POST /credits/v1/topup/5 Top up an existing key by $5.50 of credits #
GET /credits/v1/balance Balance, spend per tool and recent calls of a key (free) #
POST /credits/v1/key/rotate Move the balance to a new key; the old key stops working (free) #
GET /credits/v1/preview Free: what a pack buys at today's prices observed #
POST /credits/v1/claim Free: get the key for a pack paid with a plain USDC transfer made from the… #
GET /credits/v1/prices Free: per-route prices of every tool that accepts credits observed #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/youraitools-co:youraitools-co-credits-prepaid-packs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

youraitools-co-credits-prepaid-packs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: YourAITools Credits (prepaid packs) API
  version: 1.0.0
  description: Pay-per-call tools for AI agents, paid per request in USDC via x402 on Base, Polygon, Arbitrum One or Solana, with each tool's own spec at https://api.youraitools.co//openapi.json.
  contact:
    email: hello@youraitools.co
    url: https://youraitools.co/built-by-us
servers:
- url: https://api.youraitools.co
tags:
- name: Credits (prepaid packs)
paths:
  /credits/v1/pack/sample:
    get:
      operationId: buy_pack_sample
      summary: 'Sample pack: $0.005 of credits (try the flow end to end): mints a new API key…'
      tags:
      - Credits (prepaid packs)
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.005'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '5000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    pattern: ^yatc_[A-Za-z0-9_-]{43}$
                  shown_once:
                    type: boolean
                  pack:
                    type: string
                  paid_usd:
                    type: string
                  credited_usd:
                    type: string
                  bonus_usd:
                    type: string
                  balance_usd:
                    type: string
                  use:
                    type: object
                  balance:
                    type: string
                  topup:
                    type: object
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'Prepaid API credits (sample pack). Sample pack: $0.005 of credits (try the flow end to end): mints a new API key (shown once) Search intents: api credits sample, try api credits, prepaid api key, usdc api credits, x402 credits, agent api balance.'
    post:
      operationId: buy_pack_sample_post
      summary: 'Sample pack: $0.005 of credits (try the flow end to end): mints a new API key…'
      tags:
      - Credits (prepaid packs)
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '0.005'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '5000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    pattern: ^yatc_[A-Za-z0-9_-]{43}$
                  shown_once:
                    type: boolean
                  pack:
                    type: string
                  paid_usd:
                    type: string
                  credited_usd:
                    type: string
                  bonus_usd:
                    type: string
                  balance_usd:
                    type: string
                  use:
                    type: object
                  balance:
                    type: string
                  topup:
                    type: object
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'Prepaid API credits (sample pack). Sample pack: $0.005 of credits (try the flow end to end): mints a new API key (shown once) Search intents: api credits sample, try api credits, prepaid api key, usdc api credits, x402 credits, agent api balance.'
  /credits/v1/pack/1:
    get:
      operationId: buy_pack_1
      summary: '$1 pack: $1.00 of credits: mints a new API key (shown once)'
      tags:
      - Credits (prepaid packs)
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '1.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '1000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    pattern: ^yatc_[A-Za-z0-9_-]{43}$
                  shown_once:
                    type: boolean
                  pack:
                    type: string
                  paid_usd:
                    type: string
                  credited_usd:
                    type: string
                  bonus_usd:
                    type: string
                  balance_usd:
                    type: string
                  use:
                    type: object
                  balance:
                    type: string
                  topup:
                    type: object
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'Prepaid API credits ($1 pack). $1 pack: $1.00 of credits: mints a new API key (shown once) Search intents: prepaid api credits, api key for agents, pay once api credits, usdc api credits, x402 credits, agent api balance.'
    post:
      operationId: buy_pack_1_post
      summary: '$1 pack: $1.00 of credits: mints a new API key (shown once)'
      tags:
      - Credits (prepaid packs)
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '1.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '1000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    pattern: ^yatc_[A-Za-z0-9_-]{43}$
                  shown_once:
                    type: boolean
                  pack:
                    type: string
                  paid_usd:
                    type: string
                  credited_usd:
                    type: string
                  bonus_usd:
                    type: string
                  balance_usd:
                    type: string
                  use:
                    type: object
                  balance:
                    type: string
                  topup:
                    type: object
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'Prepaid API credits ($1 pack). $1 pack: $1.00 of credits: mints a new API key (shown once) Search intents: prepaid api credits, api key for agents, pay once api credits, usdc api credits, x402 credits, agent api balance.'
  /credits/v1/pack/5:
    get:
      operationId: buy_pack_5
      summary: '$5 pack: $5.50 of credits (10% bonus): mints a new API key (shown once)'
      tags:
      - Credits (prepaid packs)
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '5.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '5000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    pattern: ^yatc_[A-Za-z0-9_-]{43}$
                  shown_once:
                    type: boolean
                  pack:
                    type: string
                  paid_usd:
                    type: string
                  credited_usd:
                    type: string
                  bonus_usd:
                    type: string
                  balance_usd:
                    type: string
                  use:
                    type: object
                  balance:
                    type: string
                  topup:
                    type: object
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'Prepaid API credits ($5 pack with bonus). $5 pack: $5.50 of credits (10% bonus): mints a new API key (shown once) Search intents: prepaid api credits, api key for agents, pay once api credits, usdc api credits, x402 credits, agent api balance.'
    post:
      operationId: buy_pack_5_post
      summary: '$5 pack: $5.50 of credits (10% bonus): mints a new API key (shown once)'
      tags:
      - Credits (prepaid packs)
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '5.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '5000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    pattern: ^yatc_[A-Za-z0-9_-]{43}$
                  shown_once:
                    type: boolean
                  pack:
                    type: string
                  paid_usd:
                    type: string
                  credited_usd:
                    type: string
                  bonus_usd:
                    type: string
                  balance_usd:
                    type: string
                  use:
                    type: object
                  balance:
                    type: string
                  topup:
                    type: object
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'Prepaid API credits ($5 pack with bonus). $5 pack: $5.50 of credits (10% bonus): mints a new API key (shown once) Search intents: prepaid api credits, api key for agents, pay once api credits, usdc api credits, x402 credits, agent api balance.'
  /credits/v1/topup/1:
    get:
      operationId: topup_1
      summary: Top up an existing key by $1.00 of credits
      tags:
      - Credits (prepaid packs)
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer yatc_... (your credits key); X-Credits-Key also works
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '1.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '1000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  topped_up:
                    type: boolean
                  pack:
                    type: string
                  credited_usd:
                    type: string
                  balance_usd:
                    type: string
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'API credits top-up ($1). Top up an existing key by $1.00 of credits. Search intents: top up api credits, add api balance, prepaid api top up, usdc top up, x402 credits, agent api balance.'
    post:
      operationId: topup_1_post
      summary: Top up an existing key by $1.00 of credits
      tags:
      - Credits (prepaid packs)
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer yatc_... (your credits key); X-Credits-Key also works
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '1.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '1000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  topped_up:
                    type: boolean
                  pack:
                    type: string
                  credited_usd:
                    type: string
                  balance_usd:
                    type: string
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'API credits top-up ($1). Top up an existing key by $1.00 of credits. Search intents: top up api credits, add api balance, prepaid api top up, usdc top up, x402 credits, agent api balance.'
  /credits/v1/topup/5:
    get:
      operationId: topup_5
      summary: Top up an existing key by $5.50 of credits
      tags:
      - Credits (prepaid packs)
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer yatc_... (your credits key); X-Credits-Key also works
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '5.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '5000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  topped_up:
                    type: boolean
                  pack:
                    type: string
                  credited_usd:
                    type: string
                  balance_usd:
                    type: string
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'API credits top-up ($5 with bonus). Top up an existing key by $5.50 of credits. Search intents: top up api credits, add api balance, prepaid api top up, usdc top up, x402 credits, agent api balance.'
    post:
      operationId: topup_5_post
      summary: Top up an existing key by $5.50 of credits
      tags:
      - Credits (prepaid packs)
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer yatc_... (your credits key); X-Credits-Key also works
      x-payment-info:
        price:
          mode: fixed
          currency: USD
          amount: '5.00'
        protocols:
        - x402: {}
      x-x402:
        scheme: exact
        network: eip155:8453
        asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
        payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        amount: '5000000'
        assetSymbol: USDC
        x402Versions:
        - 2
        - 1
        networks:
        - network: eip155:8453
          name: Base
          asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:137
          name: Polygon
          asset: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: eip155:42161
          name: Arbitrum One
          asset: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
          symbol: USDC
          payTo: '0x3c1A1E01e790Cd326495631B3b38Bd7068F08d6F'
        - network: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
          name: Solana
          asset: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
          symbol: USDC
          payTo: FH73WbbUe2UyNzfy72MJs5nT3NxyDf9GrqE7kzjL2Jte
      responses:
        '200':
          description: Paid and settled
          content:
            application/json:
              schema:
                type: object
                properties:
                  topped_up:
                    type: boolean
                  pack:
                    type: string
                  credited_usd:
                    type: string
                  balance_usd:
                    type: string
        '400':
          description: Invalid or missing key (never charged)
        '402':
          description: Payment Required (x402 v2 terms in the PAYMENT-REQUIRED header, v1 terms in the body)
        '503':
          description: Storage unavailable (never charged)
      description: 'API credits top-up ($5 with bonus). Top up an existing key by $5.50 of credits. Search intents: top up api credits, add api balance, prepaid api top up, usdc top up, x402 credits, agent api balance.'
  /credits/v1/balance:
    get:
      operationId: credits_balance
      summary: Balance, spend per tool and recent calls of a key (free)
      security: []
      responses:
        '200':
          description: OK
        '401':
          description: Missing or malformed key
        '404':
          description: Unknown key
        '429':
          description: Rate limited
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer yatc_... (your credits key); X-Credits-Key also works
      tags:
      - Credits (prepaid packs)
  /credits/v1/key/rotate:
    post:
      operationId: rotate_key
      summary: Move the balance to a new key; the old key stops working (free)
      security: []
      responses:
        '200':
          description: OK
        '401':
          description: Missing or malformed key
        '404':
          description: Unknown key
        '429':
          description: Rate limited
      parameters:
      - name: Authorization
        in: header
        required: true
        schema:
          type: string
        description: Bearer yatc_... (your credits key); X-Credits-Key also works
      tags:
      - Credits (prepaid packs)
  /credits/v1/preview:
    get:
      operationId: credits_quote
      summary: 'Free: what a pack buys at today''s prices'
      security: []
      responses:
        '200':
          description: OK
        '401':
          description: Missing or malformed key
        '404':
          description: Unknown key
        '429':
          description: Rate limited
      parameters:
      - name: pack
        in: query
        required: false
        schema:
          type: string
          enum:
          - '1'
          - '5'
          - sample
      tags:
      - Credits (prepaid packs)
  /credits/v1/claim:
    post:
      operationId: claim_direct_transfer
      summary: 'Free: get the key for a pack paid with a plain USDC transfer made from the…'
      security: []
      responses:
        '200':
          description: OK
        '401':
          description: Missing or malformed key
        '404':
          description: Unknown key
        '429':
          description: Rate limited
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - chain
              - txHash
              - secret
              properties:
                chain:
                  type: string
                  enum:
                  - base
                  - polygon
                  - arbitrum
                txHash:
                  type: string
                  pattern: ^0x[0-9a-fA-F]{64}$
                secret:
                  type: string
                  pattern: ^0x[0-9a-fA-F]{64}$
      tags:
      - Credits (prepaid packs)
  /credits/v1/prices:
    get:
      operationId: credits_prices
      summary: 'Free: per-route prices of every tool that accepts credits'
      security: []
      responses:
        '200':
          description: OK
        '401':
          description: Missing or malformed key
        '404':
          description: Unknown key
        '429':
          description: Rate limited
      tags:
      - Credits (prepaid packs)
components:
  securitySchemes:
    creditsKey:
      type: http
      scheme: bearer
      description: yatc_... credits key