Skip to main content

Image Playground

Generate and edit images with vision models in an interactive workspace.

The Image Playground in Hyperstack AI Studio lets you create images from text prompts (text-to-image) or transform existing ones with image-to-image models. Compare models side by side, then copy an API-ready request to move from prototype to integration.

How to Use the Image Playground

  1. Open the Image Playground

    Navigate to the Image Playground page from the Hyperstack AI Studio sidebar under Playground → Image.

    Image Playground - Page

    The page includes controls for selecting a model, configuring parameters, entering prompts, and viewing generated outputs.

  2. Select a Model

    From the dropdown menu, choose a vision model.

    Choose a model based on the type of task you want to perform:

    Each model may support different capabilities and parameter ranges.

  3. (Optional) Adjust Image Generation Parameters

    Configure generation behavior using the available controls.

    Under the Model dropdown, click Show advanced settings to access these parameters. Parameters are dynamically rendered based on the selected model, with limits and model-dependent default values.

    Image Playground - Advanced Settings

    Click to see list of advanced settings and descriptions
    ParameterDescription
    Image SizeControls the aspect ratio and resolution of the generated image (e.g. landscape, square, portrait). Supports preset options and custom width/height (model-dependent).
    Guidance ScaleDetermines how strongly the model follows the prompt. Lower values allow more creativity, while higher values enforce stricter adherence.
    Negative PromptSpecifies elements to avoid in the generated image.
    Num ImagesNumber of images generated per request. Higher values increase cost.
    Num Inference StepsNumber of diffusion steps used to generate the image. More steps typically improve quality but increase latency.
    SeedControls reproducibility. Using the same seed with identical parameters will produce similar outputs.
  4. Enter a Prompt or Upload an Image

    Describe the image you want to generate in the input field at the bottom of the page.

    • For text-to-image, provide a descriptive prompt (subject, style, composition, lighting, etc.)
    • For image-to-image, upload an input image using the attachment icon and optionally provide a prompt. The number of images you can upload is model-dependent. Once the limit is reached, additional uploads are disabled.

    Click Send to submit the generation request.

  5. View Results

    Generated images will appear in the preview panel once processing is complete.

    Image Playground - Output

    Once complete, you can:

    • Click an image to open it in an expanded view
    • Hover to access the download option
    • Review output metadata, including model, inference steps, time taken, and 16×16 patches generated

    You can iterate on prompts, adjust parameters, and regenerate as needed.

    Tips for Best Results
    • Use descriptive prompts (subject, style, lighting, composition)
    • Add negative prompts to remove unwanted artifacts
    • Increase inference steps for higher-quality outputs
    • Adjust guidance scale to balance creativity vs control
    • Use seed values for reproducibility when iterating

Compare Side-by-Side

Click the Compare toggle to evaluate how different models respond to the same input.

  1. Select a model for each dropdown using the two model selectors.
  2. Enter your prompt (and/or upload an image if supported).
  3. View and compare both outputs side-by-side in real time.

This supports comparisons across:

  • Different providers
  • Different model architectures

Image Playground - Compare

Billing for Compare Side-by-Side

When using the Compare feature, each model is queried separately. This means you will be billed for two inference requests, one for each selected model.

To learn how to view your total usage costs, see the Accessing Billing Information in AI Studio documentation.

API Mode

The Image Playground provides an API toggle that converts your UI configuration into a ready-to-use API request. The API request varies depending on whether you are using a text-to-image or image-to-image model.

Click the API toggle in the top right corner of the Image Playground page to switch from UI → API and view the equivalent request.

Image Playground - API Mode

Image generation is asynchronous. Each request returns a job_id instead of the image itself. Poll the Get image result endpoint with that job_id until its status is completed to retrieve the generated image. For the full parameters, responses, and accepted values of every image endpoint, see the Image Generation section of the API reference.

Image Generation from Text (Text-to-Image)

This API is used to generate images directly from text prompts using text-to-image models. You provide a descriptive prompt, and the model generates one or more images based on that input.

Use this endpoint when you want to create new images from scratch without providing an input image. You can control the output using parameters such as image size, guidance scale, and number of images.

When using the UI, any prompt you enter is populated in the prompt field of the API request. Changes made in Show advanced settings are reflected in the corresponding parameters.

To send the request, replace YOUR_API_KEY with your Hyperstack API key. You can create one from the API Keys page.

curl -X POST "https://console.hyperstack.cloud/ai/api/v1/images/generations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "Qwen/Qwen-Image-2512",
"prompt": "YOUR PROMPT HERE",
"guidance_scale": 4,
"num_images": 1,
"num_inference_steps": 28,
"image_size": "landscape_4_3"
}'

The request returns a job_id with a status of queued. Poll Get image result until the status is completed to retrieve the image. For all supported parameters, see Generate image from text.

Image Generation from Image (Image-to-Image)

This API is used to transform or edit existing images using image-to-image models. You provide an input image along with a prompt describing the desired transformation.

Use this endpoint when you want to modify an existing image, such as applying a style, changing elements, or refining details. The request includes an image_url parameter pointing to the input image.

The image_url accepts a publicly reachable image URL, or an image you upload to Hyperstack. To upload, request a one-time upload URL from Get image upload URL, upload your image to it, then pass the returned filename as image_url.

When using the UI, the image_url field is populated automatically when you upload an image for image-to-image generation. Any prompt you enter is populated in the prompt field, and changes made in Show advanced settings are reflected in the corresponding parameters.

To send the request, replace YOUR_API_KEY with your Hyperstack API key. You can create one from the API Keys page.

curl -X POST "https://console.hyperstack.cloud/ai/api/v1/images/edits" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "black-forest-labs/FLUX.1-Kontext-dev",
"prompt": "YOUR PROMPT HERE",
"image_url": "YOUR_IMAGE_URL_HERE",
"guidance_scale": 2.5,
"num_images": 1,
"num_inference_steps": 28
}'

As with text-to-image, the request returns a job_id. Poll Get image result to retrieve the result. For all supported parameters, see Generate image from image.

Compare Mode (API)

In Compare mode, the API toggle works the same way as the Compare Side-by-Side view above. You select a model in each dropdown, enter a single prompt, and both models are executed. Instead of showing image outputs, the API view displays a separate request for each model.

This allows you to:

  • Quickly integrate working prompts into applications
  • Validate parameter configurations before implementation
  • Copy production-ready requests directly from the UI

Pricing and Billing

Image generation using vision models in the Playground is a billable service.

Costs are influenced by:

  • Selected model
  • Number of images generated
  • Image size (resolution), which determines the number of 16×16 patches generated
  • Use of comparison mode (multiple models)

How pricing works

Image generation pricing is based on the number of 16×16 patches generated, where 1 patch = 256 pixels (a 16×16 pixel region) of generated image output. Larger image sizes produce more patches, increasing the overall cost.

You can see pricing by vision model within the platform on the Vision Models Pricing page.

You can also view pricing for an individual model by navigating to Base Models, selecting a model, and clicking View model details. This shows the cost per 16×16 patch.

Viewing image generation usage

Image generation usage is tracked separately from Serverless Inference. You can view your consumption and cost in a dedicated Image Generation Usage Report under Billing → Resource Activity.

The report lists each image generation job with the following columns:

  • Resource Name – The name of the image generation job.
  • Model – The vision model used.
  • Unit Metric – Always 16×16 Patch for image generation (1 patch = 256 pixels).
  • Price Per 16×16 Patch – The per-patch charge for the selected model.
  • Total 16×16 Patches – The total number of patches generated by the job.
  • Total Cost – The total cost for that usage entry.

Image Generation Usage Report

For more details on all usage-report columns across AI Studio services, see the Accessing Billing Information in AI Studio documentation.


Back to top