Purchase 500 credits for search and AI chat features on Gifu via x402 payment on Base
What it does
This x402 endpoint on the Gifu API allows agents and users to purchase a bundle of 500 credits by making a POST request with a valid x402 payment header. Credits can be used for search and AI chat features provided by the Gifu service. Payment is made in USDC on the Base network, with a maximum amount of 19,000,000 atomic units (equivalent to 19 USDC, since USDC uses 6 decimals). The caller must include a JSON body containing the user's wallet address.
The endpoint returns a JSON response indicating success, the number of credits granted, and details about the purchased package (ID, credit count, and price). The x402 challenge is live and well-formed, advertising an "exact" payment scheme with a 60-second timeout. The payment recipient address is 0xCD95802A4aBddD75A5750DD2d6935007eF268275 and the USDC asset contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base.
Documentation for the Gifu API is sparse. The root endpoint confirms the service is running and lists a few routes (/health, /api/search, /api/x402/pricing), but no dedicated docs page, OpenAPI spec, or README is available. The output schema embedded in the x402 challenge provides the primary technical reference for this endpoint.
Capabilities
Use cases
- —Purchasing search and AI chat credits programmatically via an x402 payment flow
- —Agents autonomously acquiring credits to access Gifu search and chat features
- —Topping up a wallet-bound credit balance for ongoing API usage
Fit
Best for
- —AI agents that need to self-provision search and chat credits on-chain
- —Developers integrating x402-based micropayments for API access
- —Automated workflows requiring credit-based access to search and LLM chat
Not for
- —Users looking for free or trial-based search access without on-chain payment
- —Applications that need fiat payment methods rather than USDC on Base
- —High-volume bulk credit purchases (only a fixed 500-credit package is offered at this endpoint)
Quick start
curl -X POST https://gifu-server.onrender.com/api/x402/credits/purchase/500 \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <base64-encoded-x402-payment-proof>" \
-d '{"walletAddress": "0xYourWalletAddress"}'Example
Request
{
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678"
}Response
{
"credits": 500,
"package": {
"id": "pkg_500",
"price": "19000000",
"credits": 500
},
"success": true
}Endpoint
Quality
The x402 challenge is live and includes a well-structured outputSchema with input/output definitions, giving a clear picture of the endpoint contract. However, there is no OpenAPI spec, no documentation page, and no additional crawl content beyond the root health check. Pricing is inferrable from the challenge (19 USDC for 500 credits) but not explicitly documented. The response example is inferred from the outputSchema rather than observed.
Warnings
- —No OpenAPI spec or documentation page available — /docs returns 404
- —Response example is inferred from the outputSchema in the x402 challenge, not from an actual observed response
- —The service root timestamp shows 2026, which may indicate a misconfigured server clock
- —Limited information about what 'search' and 'AI chat features' the credits actually unlock
Citations
- —The endpoint is live and returns a 402 challenge with x402Version 1 on POSThttps://gifu-server.onrender.com/api/x402/credits/purchase/500
- —Payment is in USDC on Base with maxAmountRequired of 19000000 atomic unitshttps://gifu-server.onrender.com/api/x402/credits/purchase/500
- —The root endpoint lists /health, /api/search, and /api/x402/pricing as available routeshttps://gifu-server.onrender.com
- —The USDC asset contract is 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913https://gifu-server.onrender.com/api/x402/credits/purchase/500