Guides
How to Get your API Ready

API

This document describes the input and output parameters for calling AI models via API.

How to get your API ready
Step 1: Open the API Playground and copy the API call command.

Copy from API Playground

Step 2: Click API Key to find it.

Click API Key

Copy API Key

Image Generation API Documentation


Parameter NameDescriptionExample Value
URLThe API endpoint for invoking the image generation model.https://api.runc.ai/v1/images/generations
Model IDSpecifies which model to use for your API call.- black-forest-labs/flux-kontext-pro/text-to-image
- black-forest-labs/flux-kontext-max/text-to-image
- black-forest-labs/flux-kontext-pro
- black-forest-labs/flux-kontext-max
- black-forest-labs/flux.1-dev
- stepfun-ai/step1x-edit
API KeyYour authentication key, required to access the API.Click here (opens in a new tab)

Request Parameters

Field NameTypeRequiredDefault ValueSupported ModelsDescription
promptstringRequired-AllPrompt used to generate the image.
modelstringRequired-AllName of the model to use for this request.
nintOptional1black-forest-labs/flux.1-dev, black-forest-labs/flux-kontext-pro/text-to-image
black-forest-labs/flux-kontext-max/text-to-image
Number of images to generate. Value range: [1, 4].
imagestringOptional-black-forest-labs/flux.1-dev (optional), black-forest-labs/flux-kontext-max (required), black-forest-labs/flux-kontext-pro (required), stepfun-ai/step1x-edit (required)Supports image URL or Base64 encoding (format: data:image/;base64,).
imagesarray(string)Required-black-forest-labs/flux-kontext-max, black-forest-labs/flux-kontext-proArray of reference images. Each item should be a public URL or Base64-encoded image content.
response_formatstringOptionalurlblack-forest-labs/flux.1-devSpecifies the return format for generated images. url: returns image link; b64_json: returns Base64-encoded string.
sizestringOptional1024x1024black-forest-labs/flux.1-devWidth and height of the generated image, range: [256x256, 1536x1536].
strengthfloatOptional0.8black-forest-labs/flux.1-devDegree to which the reference image is applied, range: [0.0, 1.0].
aspect_ratiostringOptional1:01black-forest-labs/flux-kontext-max/text-to-image, black-forest-labs/flux-kontext-pro/text-to-imageAspect ratio of the generated image. Supported values: "21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21".
stepsintOptional28black-forest-labs/flux.1-dev, stepfun-ai/step1x-editNumber of inference steps. Higher values produce more detailed results but take longer.
seedintOptional-1AllRandom seed to control generation reproducibility. Range: [-1, 9999999999]. If not provided, automatically generated. Same seed reproduces same content.
guidance_scalefloatOptional2.5AllAdjusts the adherence to text guidance versus creativity. Higher values: more faithful to prompt but less variety; lower values: more creative. Range: [1, 10].
negative_promptstringOptional-stepfun-ai/step1x-editNegative prompt to specify elements you don’t want in the generated image.

Response Parameters

Field NameTypeDescription
createdintegerUnix timestamp (in seconds) of when this request was created.
dataarrayInformation about the generated images, including the image download URL or Base64.
• If the return format is set to url, the subfield will be url.
• If the return format is set to b64_json, the subfield will be b64_json.
Note: Links will expire within 7 days after generation, so please save the images promptly.
errorObjectError information object.
error.codestringError code.
error.messagestringError message.
error.paramstringRequest ID.

Large Language Model API Documentation

Parameter NameDescriptionExample Value
URLThe API request address, used to specify the endpoint being called.https://api.runc.ai/v1/chat/completions
Model IDSpecifies the model name to be used, determining the specific functionality of the API call.Qwen/Qwen3-Coder, gemini-2.5-pro, claude-4-sonnet, deepseek-ai/DeepSeek-R1-Distill-Llama-70B
API KeyA secret key used to verify user identity and ensure only authorized users can access the API service.Click here (opens in a new tab)
Copyright © 2025 RunC.AI All rights reserved.