Skip to main content

Documentation Index

Fetch the complete documentation index at: https://runpod-b18f5ded-promptless-remove-flash-beta-notification.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This quickstart walks you through generating an image using Runpod Public Endpoints. You’ll use the Flux Schnell model, which is optimized for fast generation.

Requirements

Step 1: Generate an image in the playground

The fastest way to test Public Endpoints is through the browser-based playground.
  1. Go to the Flux Schnell endpoint in the Runpod console.
  2. Under Input, enter a prompt: A golden retriever playing fetch on a sunny beach (or any other prompt you like).
  3. Click Run.
  4. Wait a few seconds for the image to generate. The result appears under Result.
You’ve just generated your first image. The playground shows the estimated cost (~$0.0025 for a 1024x1024 image).

Step 2: Generate an image with the API

Now let’s generate an image programmatically using the REST API.
  1. Open a terminal on your local machine.
  2. Copy the following command, replacing YOUR_API_KEY with your Runpod API key:
curl -X POST "https://api.runpod.ai/v2/black-forest-labs-flux-1-schnell/runsync" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "prompt": "A golden retriever playing fetch on a sunny beach",
      "width": 1024,
      "height": 1024
    }
  }'
  1. Paste the command into your terminal and press Enter.
  2. Wait for the response (this takes about 10-20 seconds).

Response

Both methods return a JSON response with your generated image:
{
  "status": "COMPLETED",
  "output": {
    "image_url": "https://image.runpod.ai/...",
    "cost": 0.02097152
  }
}
Open the image_url in your browser to view the generated image.
Image URLs expire after 7 days. Download images immediately if you need to keep them.

Next steps