Official Ruby SDK for PixelAPI — AI image, video, audio, and 3D API for builders.
- From $0.001 per image — image generation, background removal at $0.010, upscaling at $0.060
- 15 AI tools, one API key — image gen, BG removal, upscale, face restore, object removal, image edit, audio, voice, 3D, content moderation, smart-generate, ad creative, image search, portrait studio, interior design, photo relighting
- No cold starts — always-warm infrastructure, sub-3-second response on most endpoints
- 100 free credits on signup — no credit card required
- Production-ready — same endpoints serve our paying customers at thousands of calls per day
- GST invoice (India) — registered Indian business, GST-compliant
gem install pixelapirequire "pixelapi"
client = PixelAPI::Client.new("YOUR_KEY")
r = client.generate("product photo of red sneakers")
puts r["output_url"]
client.save(r, "out/sneakers.png")ruby examples/quickstart.rbThis SDK wraps PixelAPI's REST API. Full endpoint documentation: pixelapi.dev/docs.
| Endpoint | Description | Price |
|---|---|---|
POST /v1/image/generate |
AI image generation | $0.001/image |
POST /v1/image/remove-background |
Background removal | $0.010/image |
POST /v1/image/replace-background |
Background replacement | $0.075/image |
POST /v1/image/upscale |
4× upscaling | $0.060/image |
POST /v1/image/face-restore |
Face restoration | $0.005/face |
POST /v1/image/remove-object |
Object removal | $0.025/image |
POST /v1/image/edit |
Prompt-driven edit | $0.020/edit |
POST /v1/image/portrait |
AI portrait studio | $2.39/portrait |
POST /v1/image/relight |
Photo relighting | $0.018/image |
POST /v1/image/interior-design |
Interior design / staging | $0.075/render |
POST /v1/image/moderate |
NSFW / content moderation | $0.0005/image |
POST /v1/audio/generate |
AI music generation | $0.007/clip |
POST /v1/tts/generate |
Text-to-speech (23 languages) | $0.015/30s |
POST /v1/3d/generate |
3D model generation (GLB) | $0.50/model |
| Plan | Monthly | Credits | Best for |
|---|---|---|---|
| Free | $0 | 100 credits | Try the API |
| Starter | $10 | 10,000 credits | Side projects, low volume |
| Pro | $50 | 60,000 credits | Production apps |
| Scale | $200 | 300,000 credits | High-volume / agencies |
INR billing with GST invoice via Razorpay; international USD via Stripe / PayPal.
ENV["PIXELAPI_KEY"]
Get your API key at pixelapi.dev/app (free, no credit card).
Pass it via the X-API-Key header (or use the SDK constructor — handled automatically).
- Free: 10 requests / minute
- Starter: 60 requests / minute
- Pro: 300 requests / minute
- Scale: unlimited (fair-use)
The SDK raises typed errors for 401 (auth), 402 (insufficient credits), 429 (rate-limited), and 5xx (server-side).
- Docs: pixelapi.dev/docs
- Email: support@pixelapi.dev
MIT — see LICENSE.
Pull requests welcome. For major changes, open an issue first to discuss.
Built by the PixelAPI team. Indian business, registered with GST.