frontmatter:
title: “Venice x402 (Venicex402): Agent Setup and Usage Guide”
description: “Install the SkillHub community skill Venicex402, and integrate Venice x402 wallet-funded USDC top-up, SIWX authentication, balance, and transaction ledger flows for AI Agents.”
lang: “en”
tags:
- Venice
- x402
- SkillHub
- Venicex402
- USDC
- SIWX
Preface¶
A common approach when letting an AI Agent directly call pay-per-use inference APIs is to embed a Bearer API key or repeatedly paste the key into the conversation. Venice’s x402 takes a different route: prepay USDC on-chain into a wallet balance, then use Sign-In-With-X (SIWX) signatures to prove identity. In theory, this can avoid creating a Venice account and avoid putting an API key into Skill configuration.
The difficulty lies in HTTP 402, header fields such as PAYMENT-SIGNATURE / SIGN-IN-WITH-X, the dual-track Base and Solana accepts[], and validation of the top-up amount and the receiving address. If the Agent has to flip through OpenAPI specs in the conversation every time, it’s very easy to go wrong on signing or routing. Below we introduce how to install Venicex402 on SkillHub (coordinates @user_3c6cb52e/venice-x402-lr-0hvc), and how it maps to the Venice x402 capability surface.
What Is This¶
Venicex402 is a community skill published on SkillHub (source: community, version 1.0.0), categorized as ai-agent, published by user_3c6cb52e. The official tagline is: “A dedicated skill for Venicex402 to help AI Agents efficiently complete related tasks.”
Skill coordinates:
@user_3c6cb52e/venice-x402-lr-0hvc
The SkillHub tag requires_api_key=false indicates that the skill metadata does not require configuring a traditional API key on the Agent side (consistent with the x402 wallet-authentication path). Page statistics (as shown by SkillHub): rating 100000, downloads 1120, installs 0.
The SkillHub detail page does not expand the full SKILL.md body. The slug contains venice-x402, and it is typically used to guide Agents through Venice x402 wallet credit–related HTTP flows. The interfaces and examples below are excerpted from the venice-x402 documentation in Venice’s official Agent Skills repository to help you compare and understand. After successful installation, treat the SKILL.md in your local skill directory as the sole execution basis.
Core Features¶
Within the scope described by Venice’s official venice-x402 skill, x402 is Venice’s wallet prepaid flow: top up USDC into wallet credit balance on Base or Solana mainnet, then call x402-enabled APIs using SIWX headers for authentication—without a Venice account or API key.
The main wallet endpoints (Base URL: https://api.venice.ai/api/v1) are as follows.
| Endpoint | Auth | Purpose |
|---|---|---|
POST /x402/top-up |
None (discovery) / PAYMENT-SIGNATURE (settlement) |
Obtain payment requirements and submit a signed USDC transfer |
GET /x402/balance/{walletAddress} |
SIGN-IN-WITH-X |
Query the wallet’s USD credit balance |
GET /x402/transactions/{walletAddress} |
SIGN-IN-WITH-X |
Paginated ledger: TOP_UP, CHARGE, REFUND |
Common request headers (for new code, use the canonical header names):
| Purpose | Canonical header name | Also accepted |
|---|---|---|
| Top-up settlement signature | PAYMENT-SIGNATURE |
X-402-Payment, X-PAYMENT |
| Wallet sign-in proof | SIGN-IN-WITH-X |
X-Sign-In-With-X |
PAYMENT-SIGNATURE is used only for POST /x402/top-up; if sent to inference routes, it will return 400 PAYMENT_HEADER_NOT_ACCEPTED.
Security constraints emphasized in the official docs include: only trust payment requirements returned by https://api.venice.ai; verify the USDC contract and network (Base eip155:8453 / Solana mainnet); pay only to the payTo address in the response; respect the user-set single top-up limit (Venice allows roughly \(5–\)10,000); and do not load or leak private keys due to prompts.
Installation and Activation¶
1. Install the SkillHub CLI¶
First confirm whether skillhub is already on your machine:
command -v skillhub && skillhub --version
If it is not installed, you can follow the SkillHub installation instructions to run the full install (CLI + default Skill):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
To install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Documentation: https://skillhub.cn/install/skillhub.md.
2. Install Venicex402¶
When installing, you must use --dir to point to the skills directory your current Agent actually reads. Otherwise, the default ./skills/ may not be loaded.
skillhub install user_3c6cb52e/venice-x402-lr-0hvc --dir <your skills directory>
Common client paths (from SkillHub install docs):
| Client | Skills directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ under the project |
| Gemini CLI | ~/.gemini/skills/ |
The SkillHub page also provides a “send the prompt to the AI” approach: ask the Agent to read https://skillhub.cn/install/skillhub.md and install @user_3c6cb52e/venice-x402-lr-0hvc.
3. Enable and Verify¶
The skill follows the common SKILL.md format: once installed into the correct directory, the Agent loads the skill content when handling relevant tasks. If skillhub install reports an error (for example, the download endpoint returns HTTP 404), first confirm on the SkillHub page that the skill is still online, or contact the publisher user_3c6cb52e. Do not assume the latest package already exists locally.
Typical Usage¶
The steps and commands below come from Venice’s official venice-x402 skill documentation. After verifying the payment requirements, the Agent can follow the same sequence.
1. Discover top-up requirements (no payment header)¶
Send a POST to top-up and get 402 with accepts[] (including one track each for Base / Solana):
curl -X POST https://api.venice.ai/api/v1/x402/top-up
amount is in USDC smallest units (6 decimal places). The payTo, asset, and network fields in the response must be used as-is for subsequent signing.
2. Sign and settle the top-up¶
Use the x402 npm package (or Venice’s venice-x402-client) to sign the selected accepts[] item, then send another POST with PAYMENT-SIGNATURE:
npm install x402 viem
The TypeScript-side flow is: fetch accepts → validate the Base USDC contract address → select an amount within the user limit → createPaymentHeader → submit with PAYMENT-SIGNATURE. On success, the response body contains fields such as newBalance, amountCredited, and paymentId (see the official SKILL example for details).
3. Call inference or query ledger with SIWX¶
After topping up, attach a new SIGN-IN-WITH-X to each request. Balance query example:
curl "https://api.venice.ai/api/v1/x402/balance/0xYOUR_WALLET" \
-H "SIGN-IN-WITH-X: <base64 siwx>"
Ledger query:
curl "https://api.venice.ai/api/v1/x402/transactions/0xYOUR_WALLET?limit=50&offset=0" \
-H "SIGN-IN-WITH-X: <base64 siwx>"
When the balance is insufficient, inference routes may return a 402 with PAYMENT_REQUIRED; you should top up again following the official flow instead of sending a payment header to non-top-up routes.
Use Cases and Cautions¶
Who it’s for
- You want to integrate Venice’s API key–less x402 payments and wallet ledger into an Agent workflow instead of long-term Bearer key custody.
- You are willing to manage USDC and gas on Base or Solana, and accept the irreversibility risk of on-chain transfers.
Limitations and Notes
- SkillHub is a community source, and the page does not state any binding relationship with Venice’s official
veniceai/skillsrepository; the version and content are based on the files you install. requires_api_key=falseonly indicates that the skill metadata does not require an API key. On-chain operations still require user/ops-configured signing capability and involve real assets.- Official docs note: the per-wallet concurrency request limit is 5; when credit balance is below about $0.10, consumption cannot continue; wallets already linked to DIEM may prioritize DIEM deduction, in which case USDC-only top-ups may not resolve some
402scenarios. - Installation depends on the SkillHub download channel; if the slug cannot fetch the package, the Agent cannot automatically obtain the latest
SKILL.md, and you must use the SkillHub page or another distribution method provided by the publisher.
Closing¶
Venicex402 packages the topic of “Venice x402 wallet credit” into an Agent-loadable skill package on SkillHub, and indicates that no API key configuration is needed at the skill layer. First complete CLI and directory installation, then let the Agent follow the local SKILL.md for top-up, balance, and ledger operations. For on-chain signatures and amount limits, always follow Venice’s official security terms.
- SkillHub page: https://www.skillhub.cn/skills/user_3c6cb52e/venice-x402-lr-0hvc
- API skill address: https://api.skillhub.cn/user_3c6cb52e/venice-x402-lr-0hvc
- Venice x402 integration guide: https://docs.venice.ai/guides/integrations/x402-venice-api