{"uid":"cap_emCWNA9Rzk3EC7_AVAt-l","slug":"crypto-shark-bazaar-ai-code-endpoint-73960070","name":"Crypto Shark Bazaar – AI Code Endpoint","description":"Low-cost x402 blockchain primitives, market intelligence, and AI utilities for autonomous agents","url":"https://cryptoshark.duckdns.org/ai/code?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"string","maxLength":8000}}},"responseSchema":{"type":"json","example":{"model":"gpt-5.6-luna","result":"..."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2GvSnAjXy7PsDa9WYeCrp","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes AI-powered code generation or code-related queries for autonomous agents via a text input, returning a model-generated result","exampleAgentPrompt":"Can you write me a Python snippet that sends an x402 micropayment and then queries a crypto price feed — something a lightweight autonomous agent could call in a loop?","exampleUseCases":[{"title":"Smart contract boilerplate generation","prompt":"Write me a Solidity snippet for a simple ERC-20 token transfer that I can drop into my autonomous trading agent — keep it minimal and gas-efficient."},{"title":"Crypto price parsing script","prompt":"Generate a Python function that fetches a JSON response from a crypto price endpoint and extracts the current USD value and 24-hour percentage change."},{"title":"x402 payment integration helper","prompt":"I need a short JavaScript example showing how an AI agent should handle an HTTP 402 response and retry with an x402 payment header — can you produce that code?"}],"resultDescription":"A JSON object containing the model identifier used (e.g. 'gpt-5.6-luna') and a 'result' string field holding the AI-generated code or text response to the submitted prompt.","failureModes":["Input string exceeds 8000 character limit — request rejected","Missing required 'input' field in body — validation error","Payment of 0.1 USDC not fulfilled — 402 response before processing","Model unavailable or overloaded — error or empty result string","Malformed JSON body — parse error returned"],"whenToPreferThis":"Choose this endpoint when you need low-cost, pay-per-call AI code generation or general AI text output tightly coupled with blockchain/crypto context, especially within an x402 micropayment workflow where per-call billing is preferred over subscription APIs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T06:30:29.249Z","isFirstParty":false,"canonicalSlug":"crypto-shark-bazaar-ai-code-endpoint-73960070"}