# YiduoChan API Credits Purchase

> YiduoChan API Credits Purchase is a paid API for AI agents from yiduochan.com, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-13).

Purchase $0.10 of prepaid inference credits via crypto payment and receive an OpenAI-compatible API key with no account required.

## Facts

- Endpoint: POST https://yiduochan.com/api/x402/credits/0.10
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/yiduochan-api-credits-purchase-4f36874a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eqfEy_7os33KNvGVMNrxj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability yiduochan-api-credits-purchase-4f36874a -d '<json body>'
```

Example prompt: Buy me $0.10 of YiduoChan inference credits using my crypto wallet so I get a fresh API key I can use right away for chat, image, and TTS models — no account needed.

## When to prefer this

Choose this endpoint when you need immediate, anonymous access to an OpenAI-compatible inference gateway covering chat, reasoning, TTS, image, and video models — all from a single $0.10 top-up with no email or account registration. Prefer it over traditional API providers when working in a crypto-native or x402 payment context, or when you need a throwaway key for short-lived agent pipelines without committing to a subscription.

## Known failure modes

- Payment signature invalid or missing — returns 402 or 401 with payment requirement details
- Insufficient USDC balance in wallet — payment fails before credits are issued
- Transaction not yet settled on-chain — 'credited' field returns false, key may not be active
- Network or blockchain congestion causes timeout during settlement
- Expired or replayed payment signature rejected by gateway

## How this service works

Buy $0.10 of prepaid credits for the YiduoChan inference gateway and receive a working API key in the response. The key works with any OpenAI-compatible client against https://yiduochan.com/v1 and covers chat, reasoning, text-to-speech, image and video models. Credits are spent per token at published rates; no account, email or signup is required.

## Output

Returns a JSON object containing: an API key (Bearer token for OpenAI-compatible requests), the base URL (https://yiduochan.com/v1), amount credited in USD, a boolean confirming credit settlement, the buyer wallet address, a Unix expiry timestamp for the key, a link to the model catalogue, updated account balance in USD, and the blockchain transaction hash.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {},
     "description": "No request body. Payment is carried in the PAYMENT-SIGNATURE header.",
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "api_key",
      "base_url",
      "amount_usd",
      "credited"
     ],
     "properties": {
      "wallet": {
       "type": "string",
       "description": "Buyer address the credits belong to"
      },
      "api_key": {
       "type": "string",
       "description": "Bearer token for the OpenAI-compatible API"
      },
      "base_url": {
       "type": "string",
       "description": "OpenAI-compatible base URL"
      },
      "credited": {
       "type": "boolean",
       "description": "True once the transfer settled and the balance was added"
      },
      "amount_usd": {
       "type": "string",
       "description": "Credits purchased, in USD"
      },
      "expires_at": {
       "type": "integer",
       "description": "Unix time the API key stops working"
      },
      "models_url": {
       "type": "string",
       "description": "Model catalogue endpoint"
      },
      "balance_usd": {
       "type": "string",
       "description": "Account balance after this purchase"
      },
      "transaction_hash": {
       "type": "string",
       "description": "Settlement transaction"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/yiduochan-api-credits-purchase-4f36874a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from yiduochan.com](https://www.zero.xyz/host/yiduochan.com/llms.txt)
