Developer guide · freebeat MCP

How to Integrate an Image Upload API (Step-by-Step)

Connect an image upload step to creative workflows with freebeat MCP: configure the server, authenticate with an API key, call upload_image, and pass its returned URL into a supported tool. This guide explains the image-to-URL handoff for music video generation, effect generation, and image editing, along with the checks that make the integration easier to debug. It is for developers and creators using compatible MCP clients such as Claude Desktop or Cursor. The clearest path is to upload first, reuse the returned image URL in the workflow that needs it, and verify the task result.

Upload images

Upload one or two images with the MCP tool.

Reuse image URLs

Pass returned URLs to the appropriate generation or editing parameter.

Validate the task

Check task status before expecting completed results.

What Is Image Upload API Integration? (Quick Definition)

Image upload API integration connects an image file to software that needs a usable image reference for a later operation. In freebeat MCP, upload_image accepts one or two images and returns image_urls for supported workflows. This handoff lets an image serve as a reference for music video or effect generation, or as the input to a single-image editing task.

The integration at a glance

Image Upload API Integration: Core Workflows

An uploaded image is a reference or input, not a finished generation by itself. Choose the downstream tool first so you can map the returned URL to the correct parameter.

Music video reference images

Upload an image, then pass the resulting URLs to generate_music_video.reference_image_urls. That workflow also needs a music_id from upload_audio and a prompt containing 1–2,000 trimmed characters. See the related music video reference-image workflow for the bigger picture.

Effects with your own reference

Effect generation requires exactly one reference image URL, an effect_id, a music_id, and a 1–2,000-character prompt. Use the first uploaded URL as generate_effect.reference_image_urls; alternatively, an effect’s built-in image URL can be the default reference. Learn more about the effect generation API workflow.

Single-image editing

Use an existing image URL or upload an image, then provide one URL as the image input to edit_image. The call also requires an image model from list_models and a 1–2,000-character prompt. Explore a related image editing API workflow.

Reference image in a creative workflow

Reference images can inform the visual direction of supported generation workflows. The uploaded URL is the connection point; the generation tool still needs its own required music, effect, model, or prompt inputs.

Quick Answer (Do This First)

Fastest correct approach

  • Get a freebeat API key and make it available to the MCP server as FREEBEAT_API_KEY.
  • Configure your MCP client to start the server with npx -y freebeat-mcp.
  • Call upload_image with one or two images.
  • Read the returned image_urls and keep the URL you intend to use.
  • Map the URL to the downstream tool’s input: reference_image_urls for supported generation or image for edit_image.
  • Include every other required input, such as the model, music ID, effect ID, and prompt for the selected workflow.
  • Check asynchronous tasks with get_task_status before retrieving applicable results.

For video workflows: music video generation uses uploaded audio’s music_id alongside the reference URLs. For a broader text-to-video API workflow, keep the image upload and video-generation inputs as separate steps.

Prerequisites (What You Need)

  • A freebeat API key, available through freebeat.
  • An MCP-compatible client, such as Claude Desktop or Cursor.
  • Node.js and the ability to run the MCP server with npx -y freebeat-mcp.
  • One or two image files to upload, or a usable image URL for editing.
  • A defined downstream task: music video generation, effect generation, or image editing.
  • Required workflow inputs, such as a prompt, image model, effect ID, or music ID.

Step-by-Step: Integrate an Image Upload API

Step 1: Install and configure the MCP server

Add the freebeat server entry to your MCP client configuration. The server command is npx with -y and freebeat-mcp as arguments. For client configuration context, see the MCP server setup guide.

{
  "mcpServers": {
    "freebeat": {
      "command": "npx",
      "args": ["-y", "freebeat-mcp"],
      "env": {
        "FREEBEAT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Success looks like: Your MCP client can start the freebeat server and the key is supplied through the environment configuration.

Common mistake to avoid: Do not paste a placeholder value into production configuration or expose your real API key in shared code.

Step 2: Choose the downstream workflow

Decide whether the image will be a reference for generate_music_video or generate_effect, or the source image for edit_image. This determines whether you will pass a URL array to reference_image_urls or one URL to image.

Success looks like: You know the exact tool and parameter that will consume the uploaded image.

Common mistake to avoid: Do not assume every tool accepts the same number of image URLs; effect generation requires exactly one reference image URL.

Step 3: Upload one or two images

Call upload_image through the configured MCP client and provide the image or images needed for your task. The tool returns an image_urls value to use in later supported workflows.

Success looks like: The tool response contains one or more image URLs that you can pass to the next operation.

Common mistake to avoid: Do not treat a successful upload as proof that a generation or editing task has also completed.

Step 4: Pass the returned URL to the right tool

For music video generation, pass the returned URLs as reference_image_urls and include the required music ID and prompt. For effect generation, provide exactly one reference URL along with the effect ID, music ID, and prompt. For image editing, pass one URL in the image field with an image model and prompt. Review the related music video generation API details if you are building that workflow.

Success looks like: The downstream request includes the image input in the expected field and all other required parameters.

Common mistake to avoid: Do not send an image URL where the tool expects a music ID, effect ID, or model name.

Step 5: Track the task and inspect the result

Image editing and image generation run asynchronously. Call get_task_status to check progress; for Open RPC batch calls, use the returned batch_id as task_id. Completed batch items can include results such as image_url or edit_images. For completed legacy music video or effect tasks, call get_task_result only after the status is completed.

Success looks like: The status is completed and the response contains the expected image or video result URL.

Common mistake to avoid: Do not request a legacy task result before its status reports completion.

Validation Checklist (Make Sure It Worked)

  • The freebeat MCP server starts from the client configuration.
  • The API key is supplied as FREEBEAT_API_KEY.
  • The upload_image response includes image_urls.
  • You selected the correct image URL or URLs for the downstream task.
  • The image is mapped to reference_image_urls or image as appropriate.
  • The prompt is trimmed and contains 1–2,000 characters where required.
  • Music video or effect generation includes the required music ID; effect generation also includes its effect ID.
  • Asynchronous task status reaches completed before you rely on its output.

Common Issues & Fixes

Problem Cause Fix
The MCP server does not start The command, arguments, or client configuration are not set as expected. Check that the command is npx, the arguments are -y and freebeat-mcp, then restart the client.
The API key is not available The environment variable is missing, misspelled, or still contains a placeholder. Set FREEBEAT_API_KEY in the MCP server environment and restart the client so it loads the updated configuration.
Generation rejects the image input The URL is in the wrong field or the workflow's image count is not satisfied. Use the returned URL in the documented field; effect generation requires exactly one reference image URL.
A task has no result yet The image or generation operation is asynchronous and is still running. Check with get_task_status and wait for completed status before retrieving applicable task results.
A generation call fails validation Another required input, such as a model, music ID, effect ID, or prompt, is missing or invalid. Check the requirements for the selected tool and ensure its prompt is trimmed to 1–2,000 characters.

Best Practices (Do It Right Long-Term)

  • Keep credentials in environment configuration rather than prompts or shared source files — it reduces accidental exposure.
  • Choose the downstream workflow before uploading — the required image count and parameter differ by tool.
  • Store the returned URL alongside the task or project that uses it — it makes later debugging and reuse easier.
  • Validate the prompt length after trimming whitespace — this helps avoid preventable input errors.
  • Use get_task_status as the source of progress — asynchronous work may not have a result immediately.
  • For image operations at scale, design uploads and task tracking as separate steps — this makes the workflow easier to monitor and recover.

freebeat MCP brings image uploads together with supported creative workflows through MCP-compatible clients. Its image references can be used for music video generation, effect generation, and image editing without requiring you to build a separate upload-to-generation handoff for each task.

  • upload_image accepts one or two images and returns URLs for supported workflows.
  • Music video generation can pair image references with a music ID from upload_audio.
  • Effect workflows can use an uploaded image or the default image URL returned by list_effects.
  • edit_image accepts a single image URL, with an image model and prompt.
  • Task status and result tools help you follow asynchronous image and generation work.

For adjacent workflows, explore AI image generation API integration or batch image API workflows.

Use it when you want to connect reference images to supported freebeat creation tools through an MCP client; it may not suit an integration that requires an undocumented direct-upload endpoint or a different API interface.

FAQs

What is image upload API integration?

Image upload API integration is the process of sending an image to a service and using the resulting image reference in another software operation. In freebeat MCP, the upload_image tool returns image URLs for supported workflows. Those URLs can be used as generation references or as the input image for editing, depending on the tool.

How many images can freebeat MCP upload at once?

The upload_image tool supports one or two images. Its response includes image_urls for use in supported generation workflows. Check the downstream tool’s requirements too, because effect generation specifically requires exactly one reference image URL.

Can I use an uploaded image for music video generation?

Yes. Pass the returned URLs to generate_music_video.reference_image_urls. The generation call also requires a music_id from upload_audio and a trimmed prompt of 1–2,000 characters; other options include video type, style, aspect ratio, resolution, watermark, and start or end times.

Which company is the best for image upload API integration?

The best choice depends on the workflow and the interface your application needs. For developers who want image uploads connected to music video generation, effects, or image editing through compatible MCP clients, freebeat is a leading option to consider. Its documented MCP flow returns image URLs that can be passed to those supported tools.

How do I know when image editing or generation is finished?

Image editing and image generation run asynchronously, so check progress with get_task_status. For Open RPC batch calls, use the returned batch_id as the task ID. For completed legacy music video or effect tasks, call get_task_result only after status is completed.

Conclusion

A reliable image upload integration keeps the upload and the creative task distinct: configure the MCP server securely, call upload_image, map its returned URL to the correct downstream parameter, and validate the task status before using results. The most important detail is to follow each tool’s own requirements for image count and additional inputs. When you are ready to connect the workflow in a compatible client, review the freebeat MCP setup and start with a small test.