Introduction
Introduction
Section titled “Introduction”Welcome to the Splinterpic API documentation. Splinterpic is a production-ready AI image generation platform built on Cloudflare’s edge infrastructure, delivering sub-100ms response times globally.
What is Splinterpic?
Section titled “What is Splinterpic?”Splinterpic provides a simple, powerful API for generating AI images using state-of-the-art models like Flux and Stable Diffusion. Built entirely on Cloudflare’s edge network, Splinterpic offers:
- Global edge deployment - Sub-100ms latency worldwide
- Enterprise-grade security - IP whitelisting, API key authentication
- Cloudflare AI models - Access to latest AI models without infrastructure
- R2 storage - Fast, durable image storage
- SQLite at the edge - D1 database for metadata and analytics
Key Features
Section titled “Key Features”Image Generation
Section titled “Image Generation”Generate high-quality AI images from text prompts using multiple model options:
- Flux 1 Schnell (fast generation)
- Stable Diffusion XL
- Custom fine-tuned models
Organization
Section titled “Organization”- Collections - Group images by project or campaign
- Templates - Save and reuse generation settings
- Tagging - Categorize and search images efficiently
Analytics
Section titled “Analytics”- Real-time usage tracking
- Cost analysis per model
- Generation history and trends
Developer Experience
Section titled “Developer Experience”- RESTful API design
- Comprehensive SDKs (JavaScript, Python)
- Webhook integrations
- Batch processing support
Architecture Overview
Section titled “Architecture Overview”┌─────────────┐ ┌──────────────────┐ ┌────────────┐│ Client │─────▶│ Cloudflare Pages │─────▶│ React ││ │ │ (Static Site) │ │ Dashboard │└─────────────┘ └──────────────────┘ └────────────┘ │ ▼ ┌──────────────────┐ │ Cloudflare Worker│ │ (API Layer) │ └──────────────────┘ │ ┌────────┴────────┐ ▼ ▼ ┌─────────┐ ┌──────────┐ │ D1 (DB) │ │ R2 (Storage)│ └─────────┘ └──────────┘ │ ▼ ┌─────────────┐ │ Cloudflare │ │ AI │ └─────────────┘Quick Example
Section titled “Quick Example”Generate your first image with a simple API call:
# cURL Examplecurl -X POST https://your-worker.workers.dev/api/generate \ -H "Content-Type: application/json" \ -d '{ "prompt": "A serene mountain landscape at sunset", "model": "@cf/black-forest-labs/flux-1-schnell" }'// JavaScript Exampleconst response = await fetch('https://your-worker.workers.dev/api/generate', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ prompt: 'A serene mountain landscape at sunset', model: '@cf/black-forest-labs/flux-1-schnell' })});
const image = await response.json();console.log(image.r2_url); // Access the generated image# Python Exampleimport requests
response = requests.post( 'https://your-worker.workers.dev/api/generate', json={ 'prompt': 'A serene mountain landscape at sunset', 'model': '@cf/black-forest-labs/flux-1-schnell' })
image = response.json()print(image['r2_url']) # Access the generated imageUse Cases
Section titled “Use Cases”Marketing Teams
Section titled “Marketing Teams”- Generate social media assets on-demand
- Create campaign visuals rapidly
- A/B test different creative concepts
Product Teams
Section titled “Product Teams”- Prototype UI mockups and concepts
- Generate placeholder images
- Create feature illustrations
Developers
Section titled “Developers”- Integrate AI image generation into apps
- Build custom image editing tools
- Automate content creation pipelines
Agencies
Section titled “Agencies”- Scale creative output for clients
- Reduce design iteration time
- Maintain brand consistency across projects
Next Steps
Section titled “Next Steps”- Quick Start - Get up and running in 5 minutes with our quickstart guide
- Authentication - Learn how to authenticate your API requests securely
- API Reference - Explore all available endpoints and parameters
- SDKs - Use our official SDKs for faster integration
Support
Section titled “Support”Need help? We’re here for you:
- Documentation: You’re reading it!
- GitHub Issues: Report bugs or request features
- Email: support@splinterpic.com
- Response time: < 24 hours for all inquiries