# x402factory GPT Wrapper (Solana, M4BAZ396XPH8QAHE3X)

> x402factory GPT Wrapper (Solana, M4BAZ396XPH8QAHE3X) is a paid API for AI agents from x402factory.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Proxies OpenAI GPT calls (default gpt-4o-mini) over the x402 Solana payment protocol, with optional custom agent creation and listing, priced per token in USDC.

## Facts

- Endpoint: POST https://x402factory.ai/solana/llm/gpt/M4BAZ396XPH8QAHE3X
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402factory-ai-x402factory-2-d9850614
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yCodlajAEee5VafzJA78Q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402factory-ai-x402factory-2-d9850614 -d '<json body>'
```

Example prompt: Ask the x402factory GPT endpoint to explain the basics of Solana consensus using model gpt-4o-mini with max 500 output tokens, and charge my Solana wallet in USDC.

## When to prefer this

Choose this endpoint when you need to call OpenAI GPT models and want to pay per-use with Solana USDC via the x402 micropayment protocol, without managing an OpenAI API key yourself. Especially useful for agents operating on Solana wallets that need LLM capabilities with transparent, per-token pricing and optional stored custom agents.

## Known failure modes

- Input tokens exceed max_input_tokens cap — server returns an error instead of processing
- Insufficient USDC balance in Solana wallet — payment fails and request is rejected
- Invalid model name — OpenAI returns an error propagated back
- Malformed message payload — 400 bad request
- custom_id not found when invoking a stored agent — 404 or error response
- Network or x402 facilitator downtime — timeout or 503

## How this service works

Solana 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 /solana/llm/gpt with custom_id, or POST /solana/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. Custom LLM agent M4BAZ396XPH8QAHE3X on Solana. Model gpt-5-mini, max_input_tokens=1000, max_output_tokens=1000. Preprompt preview (first 150 chars): "You are given a URL that points to an X (Twitter) profile image (PFP).  Your task: - Convert the image URL to a 500x500 version. - Do this by replacin". Pricing mode: agent-per-token. Prepaid price (x402) for this request: 0.003478 USDC. Estimated input tokens for pricing: 1195.

## Output

Returns the GPT model's text response for direct message calls; for action=create, returns a custom_id for the stored preprompted agent; for action=list, returns up to 100 recent custom agents associated with the paying wallet. Pricing details and any token cap errors are also returned.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402factory-ai-x402factory-2-d9850614/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402factory.ai](https://www.zero.xyz/host/x402factory.ai/llms.txt)
