Skip to main content
Use your Floodgate API key with a coding tool, SDK, or workflow builder. Choose the API format your client uses, then add media tools if you want it to generate images, speech, or video.

Choose a coding tool

Add funds to your balance and configure your API key before connecting. Set routing groups or a smart routing preference, then choose a spending limit. Find models and their supported APIs in Model Square. Your key’s routing settings apply when you switch models.

Generate images and speech

Add a script, function, or MCP tool that calls the image or speech API. The tool takes a prompt or text, sends the request with your API key, and saves the returned file. For base64 responses, decode the data before saving. For binary audio, write the response bytes to a file. For an image URL, download the file. Return the local path to your coding client so it can use the result. Keep your API key in the tool’s environment. Do not include it in prompts or tool arguments.

Generate video

A video tool needs to:
  1. Submit a request using the model’s API.
  2. Keep the returned task ID and check its status.
  3. Download the completed video with authentication.
The video guide includes Veo and Wan request examples. Keep task IDs so your tool can resume checking an existing job after a timeout.

Use an SDK or workflow builder

OpenAI-compatible SDKs can call Chat Completions, Responses, Images, and Speech. Use HTTP requests for native Gemini and Wan APIs. In a workflow builder, configure an HTTP action with the documented URL, method, Authorization header, and JSON body. Handle the response as JSON, base64 data, binary audio, or a background task, depending on the API. See Function tools and MCP for how to connect tools to your application or coding client.