Payments SDK
x402 payment configuration — pricing, facilitators, grants, and subscriptionOperations
| Method | Description |
|---|---|
lucidGetAssetPricing | Get asset pricing |
lucidSetAssetPricing | Set asset pricing |
lucidDeleteAssetPricing | Remove asset pricing |
lucidGetAssetRevenue | Get asset revenue summary |
lucidWithdrawAssetRevenue | Withdraw asset revenue |
lucidGetPaymentConfig | Get x402 payment configuration |
lucidSetDefaultFacilitator | Set default payment facilitator |
lucidGetSupportedChains | List supported payment chains |
lucidSubscribeAsset | Subscribe to asset access |
lucidCreatePaymentGrant | Issue a signed payment grant |
Generated Reference
Overview
x402 payment configuration — pricing, facilitators, grants, and subscriptionAvailable Operations
- lucidGetAssetPricing - Get asset pricing
- lucidSetAssetPricing - Set asset pricing
- lucidDeleteAssetPricing - Remove asset pricing
- lucidGetAssetRevenue - Get asset revenue summary
- lucidWithdrawAssetRevenue - Withdraw asset revenue
- lucidGetPaymentConfig - Get x402 payment configuration
- lucidSetDefaultFacilitator - Set default payment facilitator
- lucidGetSupportedChains - List supported payment chains
- lucidSubscribeAsset - Subscribe to asset access
- lucidCreatePaymentGrant - Issue a signed payment grant
lucidGetAssetPricing
Retrieve the x402 pricing configuration for an AI asset. Returns null if no pricing has been configured (asset is free access). No authentication required.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidGetAssetPricingRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidGetAssetPricingResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidSetAssetPricing
Admin-only. Sets or updates the pricing configuration for an AI asset.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidSetAssetPricingRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.SuccessResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 400, 401 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidDeleteAssetPricing
Admin-only. Removes pricing (asset becomes free access).Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidDeleteAssetPricingRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidDeleteAssetPricingResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 401 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidGetAssetRevenue
Retrieve the revenue summary for an AI asset including total earned, pending settlement, and withdrawn amounts. Defaults to USDC token if not specified.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidGetAssetRevenueRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidGetAssetRevenueResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidWithdrawAssetRevenue
Admin-only. Marks confirmed revenue as pending_payout. The actual on-chain transfer happens via the batch payout epoch.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidWithdrawAssetRevenueRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidWithdrawAssetRevenueResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 401 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidGetPaymentConfig
Retrieve the current x402 payment configuration including supported chains, default facilitator, enabled status, and facilitator-specific settings.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidGetPaymentConfigResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidSetDefaultFacilitator
Admin-only. Sets the default x402 facilitator (direct, coinbase, payai).Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidSetDefaultFacilitatorRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.SuccessResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 400, 401 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidGetSupportedChains
List all blockchain chains supported for x402 payments, including the accepted payment tokens (e.g., USDC) on each chain.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidGetSupportedChainsResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidSubscribeAsset
x402-gated. Pay via USDC and receive a time-limited access subscription. On success, creates an on-chain AccessReceipt.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.LucidSubscribeAssetRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidSubscribeAssetResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.X402PaymentRequiredError | 402 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
lucidCreatePaymentGrant
Admin-only. Issues a signed payment grant for an agent run. The grant is Ed25519-signed by the orchestrator and scoped to specific models/tools.Example Usage
Standalone function
The standalone function version of this method:Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | models.CreatePaymentGrantRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.LucidCreatePaymentGrantResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 400, 401 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX | */* |
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=8b4c7e6431e9a6af1ef23b77bb4ff5fd)
.png?fit=max&auto=format&n=VsjUqn6fLqEhBiuI&q=85&s=d5651a45e4bfbabc33f74e146af3f94a)