콘텐츠로 이동
캐스털리 오픈콘솔

이미지

gemini-3.1-flash-lite-image API

이 페이지에 표시된 정확한 모델 ID를 사용하여 Modelflare를 통해 gemini-3.1-flash-lite-image을 호출하세요.

정확한 모델 ID gemini-3.1-flash-lite-image를 사용하세요. 모델 필드는 이 페이지와 정확히 일치해야 합니다.

심야 국수 카운터 위에 증기를 엮어 산호색과 보라색 리본을 만들고 있습니다.

샘플 출력gemini-3.1-flash-lite-imagePOST /v1beta/models/gemini-3.1-flash-lite-image:generateContent

매개변수: ratio=16:9

프롬프트: A late-night noodle counter, six stools and a steel pass, rain on the window behind. A cook in an orange quilted jacket has just lifted the lid off a stock pot. The steam is not dispersing: it has gathered into solid braided ribbons of coral and ultraviolet that rope up past her face and press flat along the ceiling. One hard tungsten bulb directly overhead, the street outside cold and blue. Wide camera at counter height, real density in the steam, film grain, slight vignette, no text.

이 샘플을 생성한 요청
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "A late-night noodle counter, six stools and a steel pass, rain on the window behind. A cook in an orange quilted jacket has just lifted the lid off a stock pot. The steam is not dispersing: it has gathered into solid braided ribbons of coral and ultraviolet that rope up past her face and press flat along the ceiling. One hard tungsten bulb directly overhead, the street outside cold and blue. Wide camera at counter height, real density in the steam, film grain, slight vignette, no text."
}
]
}
],
"generationConfig": {
"responseModalities": [
"IMAGE"
],
"imageConfig": {
"aspectRatio": "16:9"
}
}
}

https://modelflare.dev과 함께 Modelflare API 키를 사용합니다. 게이트웨이 진입점은 POST /v1/models/{model}:generateContent입니다.

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
터미널 창bash
curl "https://modelflare.dev/v1/models/gemini-3.1-flash-lite-image:generateContent" \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"role": "user", "parts": [{"text": "A white cat runs through a neon-lit street in the rain"}]}],
"generationConfig": {"responseModalities": ["TEXT", "IMAGE"], "imageConfig": {"aspectRatio": "16:9", "imageSize": "1K"}}
}'

Gemini 이미지 모델은 기본 contents 및 generationConfig을 사용합니다. 편집은 동일한 parts[]에 텍스트 명령과 inline_data를 보냅니다.

Gemini 이미지 모델은 기본 Gemini generateContent를 사용합니다. 동일한 contents[].parts[]에 텍스트와 참조 이미지를 넣습니다. 이미지는 inline_data를 사용합니다. 이러한 모델을 /v1/images/generations, /v1/images/edits 또는 OpenAI /v1/responses로 보내지 마십시오. imageSize 열거형은 모델별로 다르며 아래와 같습니다.

필드 필수 노트
contents[].parts[].text 예 텍스트 프롬프트 또는 편집 지침
contents[].parts[].inline_data 아니요 Base64 이미지 데이터 및 MIME 유형
contents[].parts[].inline_data.mime_type 아니요 image/jpeg / image/png / image/webp
contents[].parts[].inline_data.data 아니요 Base64로 인코딩된 참조 이미지 콘텐츠
generationConfig.responseModalities 예 ["IMAGE"] 또는 ["TEXT", "IMAGE"]
generationConfig.imageConfig.aspectRatio 아니요 1:1 / 3:2 / 2:3 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 21:9
generationConfig.imageConfig.imageSize 아니요 1K

Lite는 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 및 21:9과 함께 1K만 지원합니다. 공식 문서에는 참조 이미지 수 한도가 게시되지 않으므로 게이트웨이는 로컬 한도를 추가하지 않고 서비스 한도를 초과하면 서비스 오류를 반환합니다.

편집 명령과 참조 이미지를 동일한 contents[].parts[]에 넣습니다. inline_data.data은 Base64 이미지 콘텐츠입니다. Gemini 이미지 모델을 OpenAI 이미지 또는 Responses 엔드포인트로 보내지 마십시오.

터미널 창bash
curl "https://modelflare.dev/v1/models/gemini-3.1-flash-lite-image:generateContent" \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"role": "user", "parts": [
{"text": "Keep the subject and lighting, but replace the background with a misty pine forest."},
{"inline_data": {"mime_type": "image/jpeg", "data": "BASE64_IMAGE_DATA"}}
]}],
"generationConfig": {"responseModalities": ["TEXT", "IMAGE"], "imageConfig": {"aspectRatio": "1:1", "imageSize": "1K"}}
}'

candidates[].content.parts[] 읽기; 응답에 텍스트와 이미지 부분이 함께 포함될 수 있으므로 모든 부분이 이미지라고 가정하지 마십시오.

필드 노트
candidates[].content.parts[].inline_data 생성된 이미지 MIME 유형 및 Base64 데이터
candidates[].content.parts[].text TEXT 요청 시 텍스트 캡션이 반환됨
candidates[].finishReason 완료 또는 안전 사유
usageMetadata 서비스 반환 시 입출력 토큰 사용량

Modelflare는 gemini-3.1-flash-lite-image에 대한 기본 Gemini 응답 형태를 유지하고 사용 가능한 이미지 부분을 유지합니다.

기본 Gemini 요청의 필드 오류, 크기/비율 제한 및 안전 거부는 Gemini 호환 오류 응답으로 유지됩니다. 게이트웨이는 이를 OpenAI 이미지 응답으로 다시 작성하지 않습니다.

이 페이지에서는 Modelflare 모델 생성 및 편집 호출을 다룹니다. 검색 또는 지도 강화, 음성 관리 및 요소 라이브러리 관리는 이 공개 모델 호출 표면 외부의 리소스 API이며 필수 요청 필드가 아닙니다.

이 모델은 토큰 기반 청구를 사용합니다. 현재 고객 가격, 참조 정가 및 전체 사양은 모델 가격 페이지를 참조하세요.

미디어 계약 · v1

계약 ID: media.gemini-3-1-flash-lite-image.v1어댑터: image.gemini.native.v1@v1지문: 3eb181032c0d879a99b4c879c0ee28f714c72bf3d9c228ccc50eb61a3778b79e

공식 출처: Google

계약 매개변수

인텐트 필드컨트롤옵션
sizeselect1K
ratioselect1:1 / 3:2 / 2:3 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 21:9

지원되는 기능

  • allowed_values · size · 1K
  • allowed_values · ratio · 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

구조화된 요청 예시

text

인텐트

{
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "1:1",
  "size": "1K"
}

제공자 요청

{
  "contents": [
    {
      "parts": [
        {
          "text": "A red paper kite over a quiet harbour at dusk."
        }
      ],
      "role": "user"
    }
  ],
  "generationConfig": {
    "imageConfig": {
      "aspectRatio": "1:1",
      "imageSize": "1K"
    },
    "responseModalities": [
      "TEXT",
      "IMAGE"
    ]
  },
  "systemInstruction": {
    "parts": [
      {
        "text": "Generate an image for the user's request. If details are missing, choose reasonable defaults and still return an image. Do not ask clarifying questions."
      }
    ]
  }
}

reference

인텐트

{
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "1:1",
  "size": "1K"
}

제공자 요청

{
  "contents": [
    {
      "parts": [
        {
          "text": "A red paper kite over a quiet harbour at dusk."
        },
        {
          "inline_data": {
            "data": "AAAA",
            "mime_type": "image/png"
          }
        }
      ],
      "role": "user"
    }
  ],
  "generationConfig": {
    "imageConfig": {
      "aspectRatio": "1:1",
      "imageSize": "1K"
    },
    "responseModalities": [
      "TEXT",
      "IMAGE"
    ]
  },
  "systemInstruction": {
    "parts": [
      {
        "text": "Generate an image for the user's request. If details are missing, choose reasonable defaults and still return an image. Do not ask clarifying questions."
      }
    ]
  }
}