RapSong / FOR AI ASSISTANTS

Create from your AI assistant.

Connect RapSong to an MCP client. Discover available models, check the cost, then turn a prompt into an image or video.

MCP endpointhttps://rapsong.io/api/mcp

01 / GET CONNECTED

One endpoint. Your preferred client.

Create a key in Settings → API Keys, then set MEDIA_API_KEY in your local environment. Keys belong to this site and use your account credits. Keep them on your server or in a trusted local client; never put them in public frontend code.

.cursor/mcp.json
{
  "mcpServers": {
    "rapsong.io": {
      "url": "https://rapsong.io/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:MEDIA_API_KEY}"
      }
    }
  }
}

Restart or reconnect your client after setting the environment variable. Use a client that supports Streamable HTTP and custom bearer authentication. This endpoint does not offer an OAuth sign-in flow.

02 / QUOTE, CREATE, RETRIEVE

Know the cost before you create.

Model availability and prices come from this site’s live catalog. Choose a supported parameter combination; example dimensions and durations below are illustrative. Some models require a previous successful account payment.

  1. Discover

    Ask your assistant to call list_models and get_credits.

  2. Review a quote

    Call generate_image or generate_video with dry_run: true. This returns a credit quote without creating a task or charging credits.

  3. Confirm and create

    Approve the cost, then call the same tool with dry_run: false, a new UUID requestId, and the returned pricingRevision and maxCredits.

  4. Retrieve

    Call get_task with the returned task ID. Poll at intervals of at least 3 seconds until completion.

Try this prompt in your assistant
Check my RapSong credits and available image models.
Quote an image of a quiet mountain lake at sunrise.
Show me the credit cost and ask before creating it.
After I approve, generate it and retrieve the result.

03 / REFERENCE

Five tools, one workflow.

ToolWhat it does
list_modelsAvailable models, public IDs and supported parameter quotes.
get_creditsCurrent account credit balance.
generate_imageQuote or create one image; text generation or a reference image edit.
generate_videoQuote or create one video; text generation or image-to-video.
get_taskYour task status, charged credits and result URLs.

Transport: stateless Streamable HTTP with JSON responses. Supported protocol versions: 2025-11-25, 2025-06-18, 2025-03-26. A persistent SSE stream and session ID are not required. Tool errors return isError: true with a safe error message.

04 / USAGE & LIMITS

Built on your existing account.

Credits, retries and refunds

Generation uses the same account balance and settlement rules as the website. Each request creates one output. Reuse the identical UUID and body after a timeout; a new UUID creates a new paid task. If pricing changes, review a new quote before submitting a new request. Check task status and account credit history for failure settlements.

Reference images and supported workflows

Upload a reference to this site first. Use data.urls[0] as referenceImageUrl with mode: "edit". Only references owned by your account are accepted. Maximum image size: 10 MiB, 40 megapixels. Website-specific motion-transfer and studio recipes are not part of this API.

Upload a reference image
curl 'https://rapsong.io/api/v1/uploads' \
  -H "Authorization: Bearer $MEDIA_API_KEY" \
  -F 'file=@reference.png'
Request limits and key security

JSON requests are limited to 32 KiB. Poll at intervals of at least 3 seconds. Generation also follows this site’s queue and account limits. For HTTP 429, respect Retry-After; for MCP rate-limit tool errors, wait one minute. Revoke unused keys in Settings. Keys from another site cannot access this account.

Need help? support@rapsong.io · REST API documentation →