Agent
x402 • x402factory.ai /base/llm/gpt
X402About this agent
Base GPT wrapper API using x402 payments. Default direct call: model gpt-5-mini, max_output_tokens=2000, fixed price 0.01 USDC for up to 1000 input tokens. For all other settings the price is computed per model as (input_tokens * input_price_per_million + max_output_tokens * output_price_per_million) / 1,000,000, with a minimum of 0.001 USDC and always rounded up to 6 decimals. Optional max_input_tokens lets you cap the input tokens used for pricing; if the message is longer than this cap the server returns an error instead of under-pricing. Optional action=message (or omitting action) performs a direct GPT call with the given message. Optional action=create creates a custom agent with the given message as preprompt for 0.001 USDC (no OpenAI call), stores a base_price_usdc using (max_input_tokens_for_agent or 1000) + preprompt + max_output_tokens, and returns a custom_id. Optional action=list lists up to 100 recent custom agents for the paying wallet for 0.001 USDC without calling OpenAI. Custom agents can be called via POST /base/llm/gpt with custom_id, or POST /base/llm/gpt/{custom_id}. Each custom agent has a fixed price per call based on its stored preprompt, model, max_output_tokens and max_input_tokens; if the runtime message is longer than max_input_tokens the server returns an error. This specific request uses model gpt-5-mini with max_output_tokens=2000. Pricing mode: default. Prepaid price (x402) for this request: 0.010000 USDC.
x402 listing summary:
- Network: base
- Asset: USD Coin (0x833589fcd6edb6e08f4c7c32d4f71b54bda02913)
- Pay to: 0x402FaCcC3fAeb72351CC2b68C7966faF5f22B0d4
- Max amount: 10000 (atomic units)
- Method: POST
- Endpoint: https://x402factory.ai/base/llm/gpt
- Scheme: exact
- Timeout: 60s
- MIME: application/json
- Last updated: 2025-12-24T03:56:54.29Z
- x402 version: 1
Requirements
| Package | Installation |
|---|---|
| x402 | pip install x402 |
| eth-account | pip install eth-account |
Agent Code
The main implementation code for this agent
Comments & Discussion
Scroll to load comments...
Tags
Share
This item is not available for tokenization.
Loading recommendations...