# Reality Fabricator > AI Agent Platform & Creative Developer API — Image generation, video, 3D models, VTuber avatars, segmentation, lip-sync Last updated: 2026-07-19. Full docs: https://rfab.ai/llms-full.txt Reality Fabricator is an AI agent platform where users build autonomous AI agents that think independently and take real-world actions. It also provides a **Developer API** with 30+ endpoints for AI-powered creative media: image generation (100+ models, 6 providers), video generation, 3D model generation, VTuber avatar creation, computer vision segmentation, lip-sync animation, and more — all through a single API key. ## Key Capabilities - **Autonomous AI Agents**: Self-directed agents with goals, persistent memory, and continuous thinking cycles - **Phone Calls**: Agents make real voice calls via Vapi + OpenAI Realtime API (8 voices, sub-200ms latency) - **Two-Way Email**: Send and receive emails at agent@rfab.ai addresses via AWS SES - **SMS & WhatsApp**: Messaging via Twilio - **70+ Actions**: Communication, coding, research, memory, visual, and integration actions - **15+ AI Models**: Claude Fable 5, GPT-5.6, Gemini 3.1 Pro, Grok 4.5, Mistral Medium 3.5, DeepSeek V4, and more - **Alloy Mode**: Multi-model intelligence pools — agents cycle through models with automatic failure exclusion - **Plain Language Chaining**: Orchestrate complex multi-action workflows using natural language (no coding) - **40+ Software Dev Actions**: LSP-powered code understanding, Git, testing, deployment - **Browser Automation**: Natural language Playwright control - **AES-256-GCM Encrypted Local Storage**: Client-side encryption, data never leaves device unless user opts for cloud - **6 Languages**: English, Spanish, Portuguese, French, German, Polish ## Developer API — 30+ Creative Media Endpoints One API key. One token balance. Access image gen, video gen, 3D modeling, VTuber avatars, computer vision, and more. ### How to get started 1. Sign up free at https://rfab.ai (Google login, no credit card) 2. Go to Settings → API Keys → Create a key 3. Use the key in the `X-API-Key` header on any API endpoint ### Authentication ``` curl -X POST https://api.rfab.ai/api/image-generation/generate \ -H "X-API-Key: rfab_your_key_here" \ -H "Content-Type: application/json" \ -d '{"prompt": "a cyberpunk cityscape at sunset", "style": "photorealistic"}' ``` ### Image Generation (100+ models, 6 providers) - `POST /api/image-generation/generate` — Text-to-image. Supports `style` parameter for auto model selection (e.g. `"style": "pixel-art"`, `"photorealistic"`, `"anime"`, `"fast"`). Supports `alphaRegion` for transparent cutouts (game UI frames, HUD overlays) - `POST /api/image-generation/img2img` — Image-to-image transformation. Supports `imageBase64` alternative to `imageUrl` - `POST /api/image-generation/inpaint` — Inpainting with masks. Supports `imageBase64`/`maskBase64` for inline masks - `POST /api/image-generation/enhance-prompt` — AI prompt enhancement - `GET /api/image-generation/models` — List all image models with `tags`, `best_for`, and `availableStyles` - `GET /api/image-generation/img2img-models` — List img2img models Providers: Replicate (Nano Banana Pro, Flux Kontext, Flux Dev, GPT Image 2, SDXL), ModelsLab (100+), Runware (FLUX.2 Pro, Juggernaut XL, Pony/Illustrious XL), Atlas Cloud, Grok, AWS Bedrock **Style shortcuts:** `pixel-art`, `retro`, `game-assets`, `8bit`, `16bit`, `anime`, `anime-nsfw`, `photorealistic`, `realistic`, `artistic`, `fantasy`, `cartoon`, `instruction-following`, `precise`, `text-rendering`, `premium`, `fast`, `budget`, `furry`, `character-consistency` ### Video Generation - `POST /api/image-generation/generate-video` — Image-to-video (Kling 2.5, Seedance, Atlas Cloud) - `GET /api/image-generation/i2v-models` — List video models ### Lip-Sync / Talking Head - `POST /api/image-generation/generate-lip-sync` — Portrait + audio → talking-head video (Kling Avatar) - `GET /api/image-generation/lip-sync-models` — List lip-sync models ### 3D Model Generation (Tripo3D) - `POST /api/model-generation/generate` — Text-to-3D or image-to-3D model, also multiview - `GET /api/model-generation/` — List user's 3D models - `GET /api/model-generation/:id` — Task status and details - `GET /api/model-generation/:id/model.glb` — Download GLB file - `POST /api/model-generation/:id/export` — Export to OBJ format ### VTuber Avatar Generation - `POST /api/vtuber-avatar/generate` — Generate VTuber avatar with expression variants - `GET /api/vtuber-avatar/` — List user's avatars - `GET /api/vtuber-avatar/:id` — Get specific avatar - `POST /api/vtuber-avatar/:id/regenerate-expression` — Regenerate expression - `POST /api/vtuber-avatar/:id/start-expressions` — Start expression generation ### Computer Vision / Segmentation - `POST /api/image-generation/segment` — SAM2 auto-segmentation - `POST /api/image-generation/segment-subject` — BiRefNet main subject isolation - `POST /api/image-generation/segment-text` — GroundedSAM text-prompted segmentation - `POST /api/image-generation/segment-box` — SAM2 bounding box segmentation - `POST /api/image-generation/segment-points` — SAM2 point-based segmentation - `POST /api/image-generation/grounded-sam` — Grounding DINO + SAM pixel-perfect - `POST /api/image-generation/parse-face` — BiSeNet face parsing (19 labeled regions) - `POST /api/image-generation/isolate-figure` — RMBG-2.0 background removal - `POST /api/image-generation/seethrough-decompose` — Anime layer decomposition - `POST /api/image-generation/vision-select-masks` — GPT-4o vision mask selection ### Gallery & Assets - `POST /api/image-generation/upload` — Upload image to gallery - `GET /api/image-generation/gallery` — List generated images - `DELETE /api/image-generation/gallery/:id` — Delete a gallery image - `GET /api/image-generation/file/:id` — Stream image bytes - `POST /api/image-generation/character-references` — Save character reference cutout - `GET /api/image-generation/character-references` — List saved references ### Token Balance & Billing - `GET /api/tokens/balance` — Get token balance, usage stats, recent transactions - `GET /api/tokens/usage` — Detailed usage breakdown by service type - `GET /api/tokens/history` — Full transaction history ### API Key Management (requires JWT auth) - `POST /api/user/api-keys` — Create a new API key - `GET /api/user/api-keys` — List all keys (full key viewable) - `DELETE /api/user/api-keys/:id` — Revoke a key ### Error Handling All errors return JSON: `{ "success": false, "error": "...", "code": "..." }` - 401 `INVALID_API_KEY` — Key is invalid, revoked, or expired - 403 `INSUFFICIENT_TOKENS` — Not enough tokens - 429 `RATE_LIMITED` — Wait 2–5s and retry - 500 — Retry with exponential backoff (max 3 attempts) ### Response format All endpoints return JSON. Image/video results include **permanent S3 URLs** (never expire): ```json { "success": true, "images": ["https://rfab-media.s3.amazonaws.com/.../image.png"], "imageUrl": "https://rfab-media.s3.amazonaws.com/.../image.png", "modelUsed": "replicate:black-forest-labs/flux-schnell", "prompt": "a cyberpunk cityscape at sunset", "generationTime": 3.2, "provider": "replicate" } ``` ### Token Costs (approximate) - Image gen (Flux Schnell): ~3,000 tokens - Image gen (Flux Dev): ~5,000 tokens - Video gen (Kling 2.5): ~15,000–30,000 tokens - 3D model gen: ~10,000 tokens - Segmentation/BG removal: ~2,000 tokens - Free tier: 50,000 signup + 25,000 daily ## Game Development Workflows (for AI Agents) RFAB's API endpoints can be chained together to build complete game asset pipelines. Here are ready-to-use workflows for AI agents building games: ### Pixel Art Sprite Sheet Pipeline 1. `POST /generate` with `style: "pixel-art"` (or `modelId: "pixel-art-diffusion-xl"`) — Dedicated pixel art model for retro sprites. Or use Flux/GPT Image with "pixel art, clean edges, limited palette, game sprite" prompting. 2. `POST /isolate-figure` — RMBG-2.0 background removal → transparent PNG 3. `POST /generate-video` — Animate with motion prompt (e.g. "walk cycle, side view, looping"). Models: Kling 2.5, Seedance 2.0 4. Client-side: ffmpeg frame extraction → Pillow/canvas sprite sheet assembly → optional palette quantization (16/32 colors for retro) 5. Alternative: Use Flux Kontext Pro with a reference image to generate each animation frame separately for pose control **Pixel art prompting tips:** Include "pixel art, clean edges, limited palette, game sprite, [NES/SNES/GBA] style". Negative prompt: "blurry, smooth, anti-aliased, realistic, photographic". Specify resolution style: "32x32", "64x64". **Animation prompts:** "walk cycle", "idle breathing", "sword slash attack", "running cycle", "jump", "death collapse", "spell cast" ### 3D Game Asset Pipeline 1. `POST /generate` — Generate concept art for a character/prop/environment piece 2. `POST /isolate-figure` — Clean background removal 3. `POST /api/model-generation/generate` — Image-to-3D model (Tripo3D) 4. `GET /api/model-generation/:id/model.glb` — Download GLB for Unity/Unreal/Godot 5. `POST /api/model-generation/:id/export` — Export OBJ if needed ### Tileset / Environment Art 1. `POST /generate` — Generate seamless tile textures (prompt: "seamless tileable [material], game art, top-down view") 2. `POST /img2img` — Riff variations for variety 3. `POST /inpaint` — Fix edges for seamless tiling ### Character Expression Sheets 1. `POST /api/vtuber-avatar/generate` — Generate character with multiple expressions (happy, sad, angry, surprised) 2. `GET /api/vtuber-avatar/:id` — Retrieve all expression variants 3. Use as NPC dialogue portraits, visual novel sprites, or VTuber rigs ### Cutscene / Cinematic Pipeline 1. `POST /generate` — Generate key frames for each scene 2. `POST /generate-video` — Animate each key frame into a video clip 3. `POST /generate-lip-sync` — Add talking-head animation for dialogue scenes 4. Chain clips together for a full cutscene sequence ### Concept Art & Iteration 1. `POST /generate` — Generate initial concept 2. `POST /enhance-prompt` — AI-improve prompts for better results 3. `POST /img2img` — Iterate and refine 4. `POST /inpaint` — Edit specific regions 5. `POST /segment-text` — Isolate specific elements (e.g. "the sword", "the helmet") ### NPC Face / Portrait Pipeline 1. `POST /generate` — Generate character portrait 2. `POST /parse-face` — Get 19-region face segmentation (skin, eyes, hair, lips, etc.) 3. `POST /inpaint` — Modify specific facial features 4. `POST /isolate-figure` — Extract clean portrait ### Background / Parallax Layers 1. `POST /generate` — Generate full scene 2. `POST /segment-text` — Segment by description ("the sky", "the mountains", "the foreground trees") 3. Each mask becomes a parallax layer for 2D games ### Multi-Angle Character Reference 1. `POST /api/model-generation/generate` with `mode: "generate_multiview_image"` — Get front/side/back views 2. Use multiview images as consistent character references across scenes 3. Feed back into image gen for consistent character art ## Consumer Features (Web App) In addition to the Developer API, Reality Fabricator offers these consumer-facing tools: - **Art Search** (`/art-search`) — Multi-source anime/illustration search aggregator. Searches 15+ sites simultaneously (Danbooru, Gelbooru, Rule34, e621, yande.re, Konachan, Pixiv, Sankaku, nhentai, E-Hentai, DeviantArt, FurAffinity, Inkbunny, and more). MD5 dedup, tag autocomplete, NSFW/SFW rating filters, direct download, gallery ZIP download, pool/sequence discovery. Free, no account required. - **Creator Studio** (`/creator-studio`) — AI image and video generation studio. 100+ models, 6 providers. Text-to-image, img2img, inpainting, video gen, lip-sync, segmentation, style recipe LoRA presets. Free with daily tokens. - **VTuber Avatar Creator** (`/vtuber-avatar`) — Generate AI VTuber avatars with expression variants. Automatic Live2D CMO3 rigging. Free, no account required. - **DM Turn Narrator** (`/dm-narrator`) — AI narration for tabletop RPGs (D&D, Pathfinder). 6 tone presets, session export, multiple AI models. - **Super Search** (`/super-search`) — Multi-model AI deep research tool. Comprehensive research documents with citations. Shareable via `/research/:id`. - **Anime Auto-Dubber** (`/anime-dubber`) — Upload anime clips (≤30 min), get AI-dubbed versions in 29 languages via ElevenLabs. - **AI Card Game** (`/card-game`) — Build custom AI-generated card decks, play vs AI or PvP. - **Lorebook Manager** (`/lorebooks`) — World building tools for AI adventures. Keyword-triggered lore injection during gameplay. - **Historic Chat** (`/historic-chat`) — Chat with vintage AI language models. Free, no account required. - **Based AI** (`/based-ai`) — Uncensored multi-model chat. 15+ models, streaming responses. - **AI Recipe Gallery** (`/recipes`) — Browse and create AI-generated recipes with images, nutrition, and cultural context. - **Adventures** (`/adventures`) — AI-powered interactive fiction with branching narratives. 6 languages. - **Companions** (`/companions`) — AI chat companions with persistent memory. 6 languages. - **NSFW Adventures** (`/nsfw-adventures`) — Adult interactive fiction. 6 languages. - **Autonomous AI Agents** (`/autonomous-ai`) — Build AI agents that make phone calls, send email/SMS, browse the web, write code, and more. - **Agent Directory** (`/agent-directory/global`) — Browse public AI agents. ## Pricing - Free: 50,000 tokens on signup + 25,000 daily tokens (no credit card) - DeepSeek R1: Completely free, unlimited - Paid: Transparent cost-based token pricing - Crypto: BTC, ETH, USDC accepted ## Links - Website: https://rfab.ai - Full Documentation: https://rfab.ai/.well-known/llms-full.txt - API Base URL: https://api.rfab.ai - Contact: support@rfab.ai