Skip to main content
POST
/
v1
/
tools
/
build
curl -X POST https://win.oneshotagent.com/v1/tools/build \
  -H "Content-Type: application/json" \
  -H "X-Agent-ID: 0xYourWalletAddress" \
  -d '{
    "type": "saas",
    "product": {
      "name": "TaskFlow",
      "description": "AI-powered task management for remote teams. Automate workflows, track progress, and collaborate seamlessly.",
      "industry": "Productivity",
      "pricing": "Free tier, Pro $12/mo, Team $29/mo"
    },
    "lead_capture": {
      "enabled": true
    },
    "brand": {
      "primary_color": "#4F46E5",
      "tone": "professional"
    }
  }'
{
  "error": "payment_required",
  "message": "Payment required for website build.",
  "payment_request": {
    "chain_id": 8453,
    "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "25.00",
    "recipient": "0x..."
  },
  "context": {
    "tool": "build",
    "quote_id": "quote_abc123",
    "type": "saas",
    "product_name": "TaskFlow",
    "analysis": {
      "inferred_type": "saas",
      "estimated_sections": 5,
      "needs_lead_capture": true,
      "complexity_score": 0.7,
      "reasoning": "SaaS product with pricing tiers and team features"
    },
    "pricing": {
      "base_price": "10.00",
      "extra_sections_fee": "10.00",
      "lead_capture_fee": "5.00",
      "source_analysis_fee": "0.00",
      "custom_domain_fee": "0.00",
      "total": "25.00"
    },
    "expires_at": "2024-01-15T12:00:00Z"
  }
}

Overview

The Build API creates fully-functional, production-ready websites from product descriptions. From SaaS landing pages to portfolios, restaurant sites to event pages — OneShot analyzes your requirements, generates professional content, and deploys to live URLs with real hosting infrastructure. Coming soon: Full-stack applications with databases, authentication, and backend logic.

Authentication

Requires x402 payment. First call returns a quote (402), second call with payment executes.

Request Body

product
object
required
Product information for the website.
type
string
default:"saas"
Build type. Options: saas, portfolio, agency, personal, product, funnel, restaurant, event, app, social
source_url
string
URL to analyze for content/inspiration. Adds $10 to quote.
sections
string[]
Specific sections to include (e.g., ["hero", "features", "pricing", "testimonials"])
lead_capture
object
Lead capture form configuration.
brand
object
Brand customization options.
images
object
Image URLs to use.
domain
string
Custom domain (e.g., mysite.com). Adds $20 to quote.
build_id
string
Existing build ID to update (for iterations). Use /update endpoint instead.

Quote Response (402)

The first request returns pricing and analysis:
context.quote_id
string
Quote ID to include in payment request
context.type
string
Inferred website type
context.product_name
string
Product name from request
context.analysis
object
AI analysis of the build request
context.pricing
object
Detailed pricing breakdown
context.expires_at
string
Quote expiration timestamp (1 hour)

Execution Response (202)

After payment, the build is initiated:
request_id
string
Job ID for tracking build status
status
string
processing - build is in progress
build.lead_capture_email
string
Email address for lead capture (if enabled)
build.total_price
string
Total amount charged

Completed Job Result

Poll /v1/requests/{request_id} for the result:
result.url
string
Live URL (e.g., https://taskflow.oneshotagent.com)
result.preview_url
string
Preview URL before DNS propagation
result.lead_capture_email
string
Email address receiving lead submissions
result.design_score
number
AI-evaluated quality score (1-10)
curl -X POST https://win.oneshotagent.com/v1/tools/build \
  -H "Content-Type: application/json" \
  -H "X-Agent-ID: 0xYourWalletAddress" \
  -d '{
    "type": "saas",
    "product": {
      "name": "TaskFlow",
      "description": "AI-powered task management for remote teams. Automate workflows, track progress, and collaborate seamlessly.",
      "industry": "Productivity",
      "pricing": "Free tier, Pro $12/mo, Team $29/mo"
    },
    "lead_capture": {
      "enabled": true
    },
    "brand": {
      "primary_color": "#4F46E5",
      "tone": "professional"
    }
  }'
{
  "error": "payment_required",
  "message": "Payment required for website build.",
  "payment_request": {
    "chain_id": 8453,
    "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "25.00",
    "recipient": "0x..."
  },
  "context": {
    "tool": "build",
    "quote_id": "quote_abc123",
    "type": "saas",
    "product_name": "TaskFlow",
    "analysis": {
      "inferred_type": "saas",
      "estimated_sections": 5,
      "needs_lead_capture": true,
      "complexity_score": 0.7,
      "reasoning": "SaaS product with pricing tiers and team features"
    },
    "pricing": {
      "base_price": "10.00",
      "extra_sections_fee": "10.00",
      "lead_capture_fee": "5.00",
      "source_analysis_fee": "0.00",
      "custom_domain_fee": "0.00",
      "total": "25.00"
    },
    "expires_at": "2024-01-15T12:00:00Z"
  }
}

Pricing

ComponentCost
Base price (3 sections)$10.00
Extra sections$5.00 each
Lead capture$5.00
Source URL analysis$5.00
Custom domain$10.00
All builds include high-quality stock images from Unsplash at no extra cost.
Updates to existing builds are discounted. Use the Update Build endpoint with your build_id.