# Venice.ai X402 API

**Canonical:** https://apis.io/apis/venice-ai/venice-ai-x402-api/  
**Provider:** Venice.ai — https://apis.io/providers/venice-ai/  
**Base URL:** https://api.venice.ai/api/v1  
**Documentation:** https://docs.venice.ai/api-reference/api-spec

Venice.ai X402 API is one of 18 APIs that [Venice.ai](https://apis.io/providers/venice-ai/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. This API exposes 6 JSON Schema definitions. Tagged areas include x402. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 6 JSON Schemas.

Wallet-based API access using the x402 protocol. No API key required — authenticate with an EVM or Solana wallet. **How it works:** 1. **Authenticate** — Send a `SIGN-IN-WITH-X` header (base64-encoded signed SIWX payload) with any request. EVM wallets sign an EIP-4361 SIWE message; Solana wallets sign the Solana SIWX message with Ed25519. See the `siwx` security scheme for the exact format. 2. **Top up** — `POST /x402/top-up` without a payment header returns an `accepts` array with Base and Solana USDC payment options. Choose one entry, sign it using the x402 SDK (`npm install x402`), and re-submit with the `PAYMENT-SIGNATURE` header (the legacy `X-402-Payment` and `X-PAYMENT` names are also accepted). 3. **Use any endpoint** — All inference endpoints (chat, image, audio, video, embeddings) accept `siwx` as an alternative to `BearerAuth`. Charges are deducted from your USDC credit balance. 4. **Monitor balance** — `GET /x402/balance/{walletAddress}` returns your current balance. The `X-Balance-Remaining` response header on inference calls also reports it. **Quick start (5 lines):** ``` import { VeniceClient } from '@venice-ai/x402-client' const venice = new VeniceClient(process.env.WALLET_KEY) await venice.topUp(10) // $10 USDC on a supported x402 rail const res = await venice.chat({ model: 'zai-org-glm-5-1', messages: [{ role: 'user', content: 'Hello!' }] }) ``` **Payment:** USDC on Base (chain ID 8453) or Solana mainnet. Minimum top-up: $5. Alternatively, stake DIEM tokens for daily credits (1 DIEM = $1/day).

## Operations (3)

| Method | Path | Summary |
|---|---|---|
| GET | `/x402/balance/{walletAddress}` | /api/v1/x402/balance/{walletAddress} |
| POST | `/x402/top-up` | /api/v1/x402/top-up |
| GET | `/x402/transactions/{walletAddress}` | /api/v1/x402/transactions/{walletAddress} |

## Machine-readable artifacts (8)

- **OpenAPI** — https://artifacts.apis.io/venice-ai/openapi/venice-ai-x402-api-openapi.yml
- **Documentation** — https://docs.venice.ai/overview/about-venice
- **JSONSchema** — https://artifacts.apis.io/venice-ai/json-schema/venice-ai-model-response-schema.json
- **JSONSchema** — https://artifacts.apis.io/venice-ai/json-schema/venice-ai-chat-completion-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/venice-ai/json-schema/venice-ai-responses-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/venice-ai/json-schema/venice-ai-queue-video-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/venice-ai/json-schema/venice-ai-generate-image-request-schema.json
- **JSONSchema** — https://artifacts.apis.io/venice-ai/json-schema/venice-ai-multi-edit-image-request-schema.json

## Other Venice.ai APIs (12)

- [Venice.ai API Keys API](https://apis.io/apis/venice-ai/venice-ai-api-keys-api/)
- [Venice.ai Audio API](https://apis.io/apis/venice-ai/venice-ai-audio-api/)
- [Venice.ai Augment API](https://apis.io/apis/venice-ai/venice-ai-augment-api/)
- [Venice.ai Billing API](https://apis.io/apis/venice-ai/venice-ai-billing-api/)
- [Venice.ai Characters API](https://apis.io/apis/venice-ai/venice-ai-characters-api/)
- [Venice.ai Crypto RPC API](https://apis.io/apis/venice-ai/venice-ai-crypto-rpc-api/)
- [Venice.ai Decisions API](https://apis.io/apis/venice-ai/venice-ai-decisions-api/)
- [Venice.ai Embeddings API](https://apis.io/apis/venice-ai/venice-ai-embeddings-api/)
- [Venice.ai Image API](https://apis.io/apis/venice-ai/venice-ai-image-api/)
- [Venice.ai Models API](https://apis.io/apis/venice-ai/venice-ai-models-api/)
- [Venice.ai Preview API](https://apis.io/apis/venice-ai/venice-ai-preview-api/)
- [Venice.ai Responses API](https://apis.io/apis/venice-ai/venice-ai-responses-api/)

## Tags

x402

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/venice-ai/venice-ai-x402-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/venice-ai/.
