다중 모드 — 이미지 및 문서 이해
Vision 지원 모델은 image_url 유형의 콘텐츠 부분을 허용합니다. image_url
resp = client.chat.completions.create(
model="gpt-4o",
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "How many cats are in this image?"},
{"type": "image_url", "image_url": {"url": "https://.../cats.png"}}
]
}],
)이미지 토큰 청구
각 이미지는 대략 다음과 같이 청구됩니다. 1,000 ~ 4,000 해상도에 따라 토큰. 개수는 응답의 usage.prompt_tokens.