Start here

FAQ

New here? Start here.

What is Moondraft?

A tool for generating images and video with AI. Three ways to use it, all on one account: the free Mac app (a visual canvas), MCP (use it from Claude or Cursor by chatting), or the REST API (call it from your own code).

Do I need to be technical?

No. Download the Mac app and click around, or connect it to Claude with one command (see MCP Integration) and just ask — "make me 5 logo concepts." The REST API is there if you want to call it from code, but you don't have to.

How does pricing work?

The app is free and there is no monthly subscription. You only pay for what you generate, using credits. You get 50 free credits when you sign up (no card needed), then top up whenever you want.

What things cost: standard image = 1 credit · premium image = 3 · edit = 1 · enhance/upscale = 3 · video = 10 · prompt refine = free.
Credit packs: 100 credits / $9.99 · 300 / $24.99 · 1,000 / $69.99. Credits don't expire.

App vs. MCP vs. API — what's the difference?

App: the visual canvas on your Mac. MCP: lets your AI assistant use Moondraft as a tool, so you generate by chatting. API: raw HTTP for your own code. One API key works across all three and they share the same credit balance.

What's MCP, exactly?

MCP (Model Context Protocol) is a standard way to give an AI assistant new abilities. Connect Moondraft once (setup here), restart your assistant, and it can make images and video for you on request.

What if a generation fails?

Your credits are automatically refunded. You're never charged for something that didn't come back.

Do you train AI models on my prompts or images?

No — see our Privacy Policy.

How do I get an API key?

Moondraft is in private beta. Request access, then grab your key from the sign-up flow once you're in.


Getting Started

Authentication

All API requests require a Bearer token in the Authorization header.

Header
Authorization: Bearer md_your_api_key_here

To get an API key, create an account via the sign-up flow:

POST /v1/auth/send-code

Send a verification code to your email.

ParamTypeDescription
emailrequiredstringYour email address
Send verification code
curl -X POST https://moondraft.ai/v1/auth/send-code \
  -H "Content-Type: application/json" \
  -d '{ "email": "you@example.com" }'

POST /v1/auth/verify

Verify the code and receive your API key. You get 50 free credits on signup.

ParamTypeDescription
emailrequiredstringYour email address
coderequiredstring6-digit code from your email
Verify and get API key
curl -X POST https://moondraft.ai/v1/auth/verify \
  -H "Content-Type: application/json" \
  -d '{ "email": "you@example.com", "code": "123456" }'
50 free credits on signup. No credit card required.

Base URL

https://moondraft.ai

All endpoints are prefixed with /v1.


Image Generation

Generate Image

POST /v1/generate

Generate a single image from a text prompt. Optionally pass a style or character reference image.

ParamTypeDescription
promptrequiredstringWhat to generate (max 4,000 chars)
qualitystringstandard (default) or premium
aspect_ratiostringOutput ratio (default 16:9). See table below.
style_refstringBase64 image to match the visual style of
character_refstringBase64 image of a character to keep consistent

Supported aspect ratios:

RatioResolution
1:11024 x 1024
16:91344 x 768
9:16768 x 1344
3:21216 x 832
2:3832 x 1216
4:31152 x 896
3:4896 x 1152

Response:

Response
{
  "success": true,
  "quality": "standard",
  "image": "data:image/png;base64,..."
}
Credits: 1 credit (standard) or 3 credits (premium) per image.
Storage: The REST API returns images inline as base64 and does not store them, so save what you generate. The MCP tools return a hosted URL instead.
Generate an image
curl -X POST https://moondraft.ai/v1/generate \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "product photo of sneakers on marble",
    "quality": "premium",
    "aspect_ratio": "1:1"
  }'
With style reference
curl -X POST https://moondraft.ai/v1/generate \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "hero illustration for a fintech landing page",
    "style_ref": "data:image/png;base64,..."
  }'

Batch Generate

POST /v1/generate/batch

Generate up to 10 images in a single request. Same options as /v1/generate, but with an array of prompts.

ParamTypeDescription
promptsrequiredstring[]Array of prompts (max 10)
qualitystringstandard (default) or premium
aspect_ratiostringApplied to all images
style_refstringBase64 style reference for all images
character_refstringBase64 character reference for all images

Response:

Response
{
  "results": [
    { "prompt": "hero shot", "image": "data:image/png;base64,...", "success": true },
    { "prompt": "side angle", "image": "data:image/png;base64,...", "success": true }
  ],
  "quality": "premium"
}
Credits: Per-image cost (1 or 3) multiplied by number of prompts.
Batch generate
curl -X POST https://moondraft.ai/v1/generate/batch \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompts": ["hero shot", "side angle", "close-up detail"],
    "quality": "premium",
    "style_ref": "data:image/png;base64,..."
  }'

Edit Image

POST /v1/edit

Edit an existing image with a text prompt. Describe the changes you want.

ParamTypeDescription
promptrequiredstringWhat to change
imagerequiredstringBase64-encoded source image

Response:

Response
{
  "success": true,
  "image": "data:image/png;base64,..."
}
Credits: 1 credit per edit.
Edit an image
curl -X POST https://moondraft.ai/v1/edit \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "change the background to a beach sunset",
    "image": "data:image/png;base64,..."
  }'

Video Generation

Video

POST /v1/video

Generate a 5-second MP4 video. The endpoint picks the mode based on what you send:

InputModeWhat happens
prompt onlyText-to-videoGenerates video from the description
prompt + imageImage-to-videoAnimates the provided image
Speaking-character video is available through the MCP generate_video tool, not REST.
ParamTypeDescription
promptstringDescription or motion direction
imagestringBase64 image to animate
audiostringNot supported on REST
Credits: 10 credits per video. Output: 5-second MP4.
Text to video
curl -X POST https://moondraft.ai/v1/video \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "slow pan across mountain lake, sunrise" }'
Animate an image
curl -X POST https://moondraft.ai/v1/video \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "gentle push in with parallax",
    "image": "data:image/png;base64,..."
  }'

Enhancement

Enhance

POST /v1/enhance

Upscale an image to 2× resolution.

ParamTypeDescription
imagerequiredstringBase64-encoded image to upscale

Response:

Response
{
  "success": true,
  "image": "data:image/png;base64,..."
}
Credits: 3 credits per enhancement.
Enhance an image
curl -X POST https://moondraft.ai/v1/enhance \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{ "image": "data:image/png;base64,..." }'

Prompt

Prompt Refinement

POST /v1/prompt/refine

Automatically rewrite a short prompt into a longer, more detailed one — adding composition, lighting, and camera detail.

ParamTypeDescription
promptrequiredstringYour rough prompt
modestringimage (default) or video

Response:

Response
{
  "refined_prompt": "A pair of white leather sneakers resting on a slab of Calacatta marble, soft directional lighting from upper left, shallow depth of field..."
}
Free -- no credits charged.
Refine a prompt
curl -X POST https://moondraft.ai/v1/prompt/refine \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "sneakers on marble", "mode": "image" }'

Credits

Check Balance

GET /v1/credits

Returns your current credit balance.

Check balance
curl https://moondraft.ai/v1/credits \
  -H "Authorization: Bearer md_..."

Usage History

GET /v1/usage

Returns your last 100 actions with timestamps, types, and credit costs.

Get usage history
curl https://moondraft.ai/v1/usage \
  -H "Authorization: Bearer md_..."

Buy Credits

POST /v1/credits/buy

Purchase a credit pack. Returns a Stripe checkout URL.

ParamTypeDescription
packrequiredstringpack_100, pack_300, or pack_1000

Response:

Response
{
  "checkout_url": "https://checkout.stripe.com/..."
}
Buy credits
curl -X POST https://moondraft.ai/v1/credits/buy \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{ "pack": "pack_300" }'

Auto-Reload

Set a threshold and your balance tops up automatically when it drops low, so you are less likely to run out mid-project.

POST /v1/credits/auto-reload

Enable or update auto-reload settings.

ParamTypeDescription
thresholdrequirednumberReload when balance drops below this
packrequiredstringpack_100, pack_300, or pack_1000
Enable auto-reload
curl -X POST https://moondraft.ai/v1/credits/auto-reload \
  -H "Authorization: Bearer md_..." \
  -H "Content-Type: application/json" \
  -d '{ "threshold": 50, "pack": "pack_1000" }'

GET /v1/credits/auto-reload

Check current auto-reload settings.

Get auto-reload settings
curl https://moondraft.ai/v1/credits/auto-reload \
  -H "Authorization: Bearer md_..."

DELETE /v1/credits/auto-reload

Disable auto-reload.

Disable auto-reload
curl -X DELETE https://moondraft.ai/v1/credits/auto-reload \
  -H "Authorization: Bearer md_..."

Reference

Rate Limits

Per-minute limits per API key. Exceeding these returns 429 Too Many Requests.

EndpointMethodLimit
/v1/generatePOST10 req/min
/v1/generate/batchPOST3 req/min
/v1/editPOST10 req/min
/v1/videoPOST5 req/min
/v1/enhancePOST10 req/min
/v1/prompt/refinePOST20 req/min
/v1/creditsGET30 req/min
/v1/usageGET10 req/min
/v1/credits/buyPOST5 req/min
/v1/credits/auto-reloadPOST/GET/DELETE10 req/min
/v1/auth/send-codePOST5 req/min
/v1/auth/verifyPOST5 attempts / 10 min

Error Handling

All errors return JSON with an error string.

Error response format
{
  "error": "Insufficient credits"
}

HTTP status codes:

CodeMeaning
400Bad request -- missing or invalid parameters
401Unauthorized -- invalid or missing API key
402Insufficient credits
404Endpoint not found
422Content policy — prompt was rejected; rephrase and retry
413Payload too large -- image exceeds 10 MB or body exceeds 50 MB
429Rate limit exceeded -- slow down
500Internal server error
503Service temporarily unavailable

Common errors:

ErrorWhat to do
Content policy422Rephrase your prompt. The content was flagged.
Insufficient credits402Buy more credits or enable auto-reload.
Generation failed500Retry. Credits are auto-refunded on failure.
Timed out503Retry after a few seconds. Credits are refunded.
Credits are automatically refunded when a generation fails or times out.

Input Limits

LimitValue
Max prompt length4,000 characters
Max image size10 MB (base64-encoded)
Max batch size10 prompts
Max request body50 MB

MCP Integration

POST /mcp

Moondraft exposes all generation tools via the Model Context Protocol. This means you can generate images and video directly from Claude Code, Cursor, Windsurf, or any MCP-compatible client.

Add this to your MCP client's config. In Claude Code that's .mcp.json at your project root (Cursor and Windsurf use their own config files — paste the moondraft entry into theirs):

.mcp.json
{
  "mcpServers": {
    "moondraft": {
      "type": "http",
      "url": "https://moondraft.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Once configured, your AI coding assistant can generate images, create videos, enhance assets, and manage credits -- all from natural language in your terminal or editor.

Example usage in Claude Code
# In your terminal, just ask:
"Generate a hero illustration for the landing page and save it to assets/"
"Create 5 onboarding illustrations matching the app's color scheme"
"Animate this product photo with a slow zoom"