Test and deploy production-ready AI models using public endpoints.
RunPod public endpoints provide instant access to state-of-the-art AI models through simple API calls, with an API playground available through the RunPod Hub.
Our initial launch includes optimized text-to-image generation models:
Model | Description | Endpoint URL |
---|---|---|
Flux Dev | Offers exceptional prompt adherence, high visual fidelity, and rich image detail. | https://api.runpod.ai/v2/black-forest-labs-flux-1-dev/ |
Flux Schnell | Fastest and most lightweight FLUX model, ideal for local development, prototyping, and personal use. | https://api.runpod.ai/v2/black-forest-labs-flux-1-schnell/ |
The public endpoint playground provides a streamlined way to discover and experiment with AI models.
The playground offers:
To test a model in the playground:
Under Result, you can use the dropdown menu to show either a preview of the output, or the raw JSON.
After inputting parameters using the playground, you can automatically generate an API request to use in your application.
/run
or /runsync
).You can make API requests to public endpoints using any HTTP client. The endpoint URL is specific to the model you want to use.
All requests require authentication using your RunPod API key, passed in the Authorization
header. You can find and create API keys in the RunPod console under Settings > API Keys.
To learn more about the difference between synchronous and asynchronous requests, see Endpoint operations.
Here’s an example of a synchronous request to Flux Dev using the /runsync
endpoint:
Here’s an example of an asynchronous request to Flux Dev using the /run
endpoint:
You can check the status and retrieve results using the /status
endpoint, replacing {job-id}
with the job ID returned from the /run
request:
All endpoints return a consistent JSON response format:
Each endpoint accepts a different set of parameters to control the generation process.
Flux Dev is optimized for high-quality, detailed image generation. The model accepts several parameters to control the generation process:
Parameter | Type | Required | Default | Range | Description |
---|---|---|---|---|---|
prompt | string | Yes | - | - | Text description of the desired image. |
negative_prompt | string | No | - | - | Elements to exclude from the image. |
width | integer | No | 1024 | 256-1536 | Image width in pixels. Must be divisible by 64. |
height | integer | No | 1024 | 256-1536 | Image height in pixels. Must be divisible by 64. |
num_inference_steps | integer | No | 28 | 1-50 | Number of denoising steps. |
guidance | float | No | 7.5 | 0.0-10.0 | How closely to follow the prompt. |
seed | integer | No | -1 | - | Provide a seed for reproducible results. The default value (-1) will generate a random seed. |
image_format | string | No | ”jpeg" | "png” or “jpeg” | Output format. |
Flux Schnell is optimized for speed and real-time applications:
Parameter | Type | Required | Default | Range | Description |
---|---|---|---|---|---|
prompt | string | Yes | - | - | Text description of the desired image. |
negative_prompt | string | No | - | - | Elements to exclude from the image. |
width | integer | No | 1024 | 256-1536 | Image width in pixels. Must be divisible by 64. |
height | integer | No | 1024 | 256-1536 | Image height in pixels. Must be divisible by 64. |
num_inference_steps | integer | No | 4 | 1-8 | Number of denoising steps. |
guidance | float | No | 7.5 | 0.0-10.0 | How closely to follow the prompt. |
seed | integer | No | -1 | - | Provide a seed for reproducible results. The default value (-1) will generate a random seed. |
image_format | string | No | ”jpeg" | "png” or “jpeg” | Output format. |
Flux Schnell is optimized for speed and works best with lower step counts. Using higher values may not improve quality significantly.
Here is an example Python API request to Flux Dev using the /run
endpoint:
You can generate public endpoint API requests for Python and other programming languages using the public endpoint playground.
Public endpoints use transparent, usage-based pricing:
Model | Price | Billing unit |
---|---|---|
Flux Dev | $0.02 | Per megapixel |
Flux Schnell | $0.0024 | Per megapixel |
Pricing is calculated based on the actual output resolution. You will not be charged for failed generations.
Below are some pricing examples that show how you can estimate costs for different image sizes:
512×512 image (0.25 megapixels)
1024×1024 image (1 megapixel)
Runpod’s billing system rounds up after the first 10 decimal places.
When working with public endpoints, following best practices will help you achieve better results and optimize performance.
For prompt engineering, be specific with detailed prompts as they generally produce better results. Include style modifiers such as art styles, camera angles, or lighting conditions. For Flux Dev, use negative prompts to exclude unwanted elements from your images.
A good prompt example would be: “A professional portrait of a woman in business attire, studio lighting, high quality, detailed, corporate headshot style.”
For performance optimization, choose the right model for your needs. Use Flux Schnell when you need speed, and Flux Dev when you need higher quality. Standard dimensions like 1024×1024 render fastest, so stick to these unless you need specific aspect ratios. For multiple images, use asynchronous endpoints to batch your requests. Consider caching results by storing generated images to avoid regenerating identical prompts.