veya_paid_call
Run one metered x402 resource call through the VEYA policy gate. Needs your VEYA apiKey, your Solana key (solanaPrivateKey, pays the USDC) and your Robinhood Chain key (robinhoodPrivateKey, signs the VEYA record and pays its ETH gas). Keys are used in memory for this call only and never stored. Before anything is signed VEYA checks the apiKey, both keys, your USDC and ETH balances, and the policy (tool, host, resource, network, asset, payee, per-call cap, task budget, input). It then pays, verifies the Solana payment at finalized, runs a 2-of-3 validator check, records a commitment on Robinhood Chain from your address and saves the run to your VEYA account. Every refusal returns decision blocked, a stable code and payment: null. The kill switch is operator-only; callers cannot change it. Allow at least 120 s for the tool call timeout.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"apiKey": "<apiKey>",
"taskId": "<taskId>",
"idempotencyKey": "<idempotencyKey>",
"input": "<input>"
},
"name": "veya_paid_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Optional. Normally omit it and use resourceId; any URL outside the allowlist is blocked before payment. | |
| input | Yes | Input fields for the resource, exactly as listed by veya_paid_discover (string values only). | |
| apiKey | Yes | Your VEYA product API key (veya_dev_... or veya_live_...) from https://app.veyanet.tech (System -> API Keys). Every run is saved to this key's VEYA account. | |
| taskId | Yes | Your task id. Calls with the same taskId share one task budget (per VEYA account). | |
| resourceId | No | A resource id from veya_paid_discover, e.g. tokens.asset-risk-summary. | |
| idempotencyKey | Yes | Unique per intended payment (per VEYA account). Repeating it returns the same run and never pays again; use a new key for a new payment. | |
| environmentUuid | No | Optional VEYA environment on Veya.sol to record under (yours, from veya_register_environment). Defaults to the VEYA metered-call environment shown by veya_paid_discover. | |
| solanaPrivateKey | No | Your own Solana wallet secret key (base58, or a JSON array of 64 numbers). It pays the USDC for this one call from your wallet. Used in memory only, never stored, logged or returned. | |
| taskBudgetAtomic | No | Optional task budget in USDC atomic units (6 decimals, 10000 = 0.01 USDC). Defaults to the policy budget; cannot exceed the policy maximum. | |
| robinhoodPrivateKey | No | Your own Robinhood Chain wallet private key (0x + 64 hex). It signs the VEYA record (storeCommitment on Veya.sol) and pays its small ETH gas, so the record comes from your address. Used in memory only, never stored, logged or returned. |