Documentation

Everything you need to know about PayPer402 AI Generation Platform

Getting Started

PayPer402 is a professional AI generation platform that allows you to create stunning images and videos using leading AI models via HTTP 402 protocol. No subscription required - pay only for what you generate.

The platform supports 6 industry-leading models:

  • 4o Image - OpenAI's latest image generator
  • Ideogram V3 - Text-to-image with diverse art styles and text rendering
  • Qwen - Alibaba Cloud's high-quality image model with flexible control
  • Sora 2 - OpenAI's text-to-video model
  • Veo 3.1 - Google's video model with text/image input

How to Use

Step 1: Choose Type

Select whether you want to generate images or videos. Each type has different models optimized for that format.

Step 2: Select Model

Choose from available AI models. Each model has different strengths, pricing, and output styles.

Step 3: Write Prompt

Describe what you want to create. Be specific and detailed for best results. Example: "A futuristic cityscape at sunset with flying cars and neon lights"

Step 4: Pay & Generate

Complete payment via HTTP 402 protocol using USDC. Your content generates instantly after payment confirmation.

Pricing

Pay per generation. No subscription, no monthly fees.

Qwen$0.030 per picture
4o Image$0.042 per picture
Ideogram V3$0.066 per picture
Sora 2$0.210 per video
Veo 3.1$0.360 per video

HTTP 402 Payment Protocol

PayPer402 implements the real HTTP 402 Payment Required protocol with Solana blockchain payments.

How It Works

  1. Connect Wallet: First connect your Solana wallet (Phantom, Solflare, etc.)
  2. Start Generation: Select model and write your prompt
  3. HTTP 402 Response: Server returns 402 Payment Required with payment details
  4. Pay with USDC: Approve USDC transfer in your wallet on Solana network
  5. On-chain Verification: Backend verifies transaction on Solana blockchain
  6. Generation Starts: Once verified, AI generation begins

Payment Features

  • Real HTTP 402: Follows HTTP 402 specification with WWW-Authenticate header
  • Blockchain Verified: All payments verified on-chain via Solana RPC
  • USDC on Solana: Pay with USDC SPL token on Solana Mainnet
  • Instant Confirmation: Transaction confirmed in seconds
  • Transparent: View all transactions on Solscan.io
  • No Subscription: Pay only for what you generate

HTTP 402 Response Format

HTTP/1.1 402 Payment Required
WWW-Authenticate: Bearer realm="PayPer402", amount="0.40", currency="USDC"

{
  "error": "Payment Required",
  "message": "This resource requires payment",
  "generationId": "gen_1234567890_abc123",
  "paymentRequired": true,
  "amount": 0.40,
  "currency": "USDC",
  "network": "Solana",
  "model": "GPT Image 1"
}

Solana Transaction Details

Network:Solana Mainnet Beta
Token:USDC (SPL Token)
Transaction Fee:~0.000005 SOL
Confirmation:~1-3 seconds
Explorer:solscan.io

API Integration

The platform integrates with leading AI providers to deliver professional results.

OpenAI (4o Image, Sora 2)

POST /api/generate
{
  "model": "gpt-image-1",
  "prompt": "Your description",
  "type": "image"
}

Response Format

HTTP 402 Payment Required
{
  "paymentRequired": true,
  "price": 0.042,
  "paymentUrl": "/payment/...",
  "generationId": "gen_..."
}

After Payment

GET /api/generate/{generationId}

Response:
{
  "success": true,
  "result": "https://...",
  "type": "image"
}

Technical Details

Performance

  • Average generation time: 25-240 seconds (depends on model)
  • Image resolution: Up to 1024x1024
  • Video length: 5-15 seconds (Sora 2)
  • Multiple aspect ratios supported

Output Formats

  • Images: PNG, JPEG
  • Videos: MP4
  • Direct download available
  • Share to social media

Platform Features

  • Wallet-gated access (Solana wallet required)
  • Download high-resolution outputs
  • Share directly to social platforms
  • No watermarks on outputs
  • Real-time generation progress tracking
  • Multi-image generation support (up to 4)

Wallet Setup

To use PayPer402, you need a Solana wallet with USDC.

Supported Wallets

  • Phantom: Most popular Solana wallet (recommended)
  • Solflare: Feature-rich wallet with staking
  • Coinbase Wallet: From Coinbase exchange

Setup Guide

1. Install Wallet

Download Phantom from phantom.app or as a browser extension

2. Buy SOL & USDC

Buy SOL (for transaction fees) and USDC (for payments) from an exchange like Coinbase or Binance

3. Send to Wallet

Send SOL and USDC to your Solana wallet address

4. Connect & Generate

Connect wallet on PayPer402 and start generating!

Best Practices

Writing Effective Prompts

  • Be specific and detailed in your descriptions
  • Include style, mood, lighting, and composition details
  • Mention specific art styles or references if desired
  • For videos, describe movement and action

Example Prompts

Good Image Prompt:

"A serene Japanese garden at sunset, cherry blossoms falling, traditional wooden bridge over koi pond, soft golden lighting, photorealistic, 4k quality"

Good Video Prompt:

"Slow motion footage of a surfer riding a massive wave at golden hour, water droplets glistening, cinematic camera angle, professional surfing"

Support & Community

Need help? We're here to assist you. Join our community and contribute to the project.

  • Platform:Visit the main page and start generating
  • About:Learn more about our platform features
  • Status:99.9% uptime across all models

Open Source

PayPer402 is open source! Check out our code, contribute, or fork the project on GitHub.