Reference
Quick access to technical specifications and resources.
Documentation Index
API Reference
| Resource | Description |
|---|---|
| Authentication | API keys and auth methods |
| Images API | Image generation and management |
| Sessions API | Session state management |
| Characters API | Character library operations |
| Products API | Product reference operations |
| Style Presets API | Preset management |
| Usage API | Analytics and quotas |
| Admin API | Tenant administration |
| Error Codes | Complete error reference |
MCP Tools Reference
| Category | Tools |
|---|---|
| Generation | generate_image, generate_with_character, generate_with_product |
| Editing | edit_image, continue_editing, edit_uploaded_image |
| Characters | create_character, list_characters, get_character, update_character, delete_character |
| Products | create_product_reference, list_product_references, get_product_reference, delete_product_reference |
| Style Presets | create_style_preset, list_style_presets, update_style_preset, delete_style_preset |
| Analytics | get_usage_stats, get_account_summary, get_session_history, search_images |
Self-Hosting Reference
| Resource | Description |
|---|---|
| Configuration | Environment variables and secrets |
| Database Schema | D1 tables and relationships |
| Tenant Management | Multi-tenant operations |
| Operations | Monitoring and maintenance |
| Scaling | Performance optimization |
| Troubleshooting | Common issues and solutions |
Quick Reference Cards
API Key Format
sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Production key
sk_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Test keyResponse Format
json
{
"data": { /* ... */ }
}Error Response
json
{
"error": "Human readable message",
"code": "OPTIONAL_ERROR_CODE",
"details": { /* optional */ }
}Common HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 429 | Rate Limited |
| 500 | Server Error |
Aspect Ratios
| Value | Dimensions | Use Case |
|---|---|---|
square | 1:1 | Social media, avatars |
portrait | 3:4 | Mobile, stories |
landscape | 4:3 | Desktop, thumbnails |
16:9 | 16:9 | Widescreen, video |
9:16 | 9:16 | Vertical video, stories |
Image Limits
| Parameter | Limit |
|---|---|
| Prompt length | 16,384 characters (Pro), 8,192 (Flash) |
| Images per request | 4 |
| Reference images | 14 (Pro), 3 (Flash) |
| Max uploaded image | 20 MB and 4,194,304 pixels (about 4.2 MP) |
| Thumbnail size | 200x200 px |