Flux Context
エージェント見つけるライブラリ

作成

すべてのツールすべてのモデル

ワークフロー

AI 広告人気動画を再現新規
API今すぐアップグレード
エージェントライブラリ

読み込み中...

このまま待つか、ページを更新してください。

ページを更新ホームに戻るサポートに連絡

    API

    Manage your API access and requests.

    OverviewAPI KeyAPI LogsDocs

    Getting started

    QuickstartAuthenticationPoll & downloadErrors & limits

    Image models

    Seedream 5.5Seedream 5.0 ProSeedream 5.0 LiteNano Banana 2GPT Image 2Seedream 4.5

    Video models

    Seedance 2.0Seedance 2.0 MiniSeedance 2.0 FastSeedance 2.5Wan 3.0
    GPT Image 2 · Documentation

    Getting started

    QuickstartAuthenticationPoll & downloadErrors & limits

    Image models

    Seedream 5.5Seedream 5.0 ProSeedream 5.0 LiteNano Banana 2GPT Image 2Seedream 4.5

    Video models

    Seedance 2.0Seedance 2.0 MiniSeedance 2.0 FastSeedance 2.5Wan 3.0
    Docs Models

    GPT Image 2

    Generate images from text or edit images using references.

    POST
    /api/v1/generations

    Example request

    Set your FLUX_API_KEY before running. See the parameters below for supported settings.

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "gpt-image-2",
      "input": {
        "prompt": "Editorial fashion portrait in natural light",
        "aspect_ratio": "4:5",
        "resolution": "2k",
        "quality": "high"
      }
    }'

    Parameters

    Set model to gpt-image-2. These fields belong inside input.

    ParameterDescription
    prompt
    string · Required
    Describe the image you want to create. Maximum 20,000 characters.
    image_urls
    string[] · Optional
    Public HTTPS reference images. Omit for text-to-image. Up to 16 items.
    aspect_ratio
    string · Optional
    Requested image proportions.
    auto1:11:22:12:33:24:33:44:55:416:99:1621:9
    Default: auto
    resolution
    string · Optional
    Output resolution tier. Values are case-sensitive.
    1k2k4k
    Default: 1k
    quality
    string · Optional
    Image quality. Affects credit cost.
    lowmediumhigh
    Default: medium
    size
    string · Optional
    Auto resolves 2K to explicit pixels (square when aspect_ratio is auto). Accepts supported ratios or WIDTHxHEIGHT; overrides aspect_ratio.
    Default: auto

    Reference media

    Use your own publicly accessible HTTPS media URLs. Links must remain valid throughout queueing and generation. Base64 and file upload bodies are not supported by this endpoint.

    Image-to-image

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "gpt-image-2",
      "input": {
        "prompt": "Editorial fashion portrait in natural light",
        "aspect_ratio": "4:5",
        "resolution": "2k",
        "quality": "high",
        "image_urls": [
          "https://example.com/front.jpg",
          "https://example.com/back.jpg"
        ]
      }
    }'

    Credits

    Quality1k2k4k
    low358
    medium6810
    high202530

    Credits per image. The example uses 25 credits.

    Constraints

    Custom size requires 2k/4k, multiples of 16, edges <=3840, 655360–8294400 pixels, ratio <=3:1. 4k requires a 3840 edge; incompatible sizes are rejected.

    Use returned dimensions when available.

    Response

    A successful submission returns HTTP 202 and a request ID. Response excerpt:

    JSON
    {
      "id": "REQUEST_ID",
      "model": "gpt-image-2",
      "status": "processing"
    }
    Continue readingPoll & download