Skip to Content

비전 이해

OfoxAI는 멀티모달 모델의 비전 입력을 지원하여 이미지, 스크린샷, 문서 및 비디오 콘텐츠를 분석할 수 있습니다.

지원 모델

모델이미지비디오설명
openai/gpt-4o고품질 이미지 분석
openai/gpt-4o-mini빠른 이미지 분석
anthropic/claude-sonnet-4.5강력한 문서 및 코드 이해
google/gemini-3-flash-preview멀티모달 올라운드
google/gemini-3.1-pro-preview최강 멀티모달 추론

이미지 분석

URL을 통한 이미지 전송

Terminal
curl https://api.ofox.ai/v1/chat/completions \ -H "Authorization: Bearer $OFOX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4o", "messages": [{ "role": "user", "content": [ {"type": "text", "text": "이 이미지의 내용을 설명해 주세요"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}} ] }] }'

Base64를 통한 이미지 전송

로컬 파일이나 스크린샷에 적합합니다:

vision_base64.py
import base64 # 로컬 이미지 읽기 with open("screenshot.png", "rb") as f: image_data = base64.standard_b64encode(f.read()).decode("utf-8") response = client.chat.completions.create( model="openai/gpt-4o", messages=[{ "role": "user", "content": [ {"type": "text", "text": "이 스크린샷에 무엇이 표시되어 있나요?"}, { "type": "image_url", "image_url": { "url": f"data:image/png;base64,{image_data}" } } ] }] )

이미지 상세 수준

detail 파라미터로 분석 정밀도를 제어합니다:

설명적합한 시나리오
auto자동 선택 (기본값)일반 시나리오
low저정밀도, 더 빠름간단한 분류, 태그 인식
high고정밀도, 더 상세함문서 OCR, 세부 분석
{ "type": "image_url", "image_url": { "url": "https://example.com/document.jpg", "detail": "high" # 고정밀도 모드 } }

다중 이미지 비교

하나의 요청에서 여러 이미지를 전송할 수 있습니다:

response = client.chat.completions.create( model="openai/gpt-4o", messages=[{ "role": "user", "content": [ {"type": "text", "text": "이 두 이미지의 차이를 비교해 주세요"}, {"type": "image_url", "image_url": {"url": "https://example.com/before.jpg"}}, {"type": "image_url", "image_url": {"url": "https://example.com/after.jpg"}} ] }] )

Anthropic 프로토콜의 비전 입력

import anthropic client = anthropic.Anthropic( base_url="https://api.ofox.ai/anthropic", api_key="<OFOXAI_API_KEY>" ) message = client.messages.create( model="anthropic/claude-sonnet-4.5", max_tokens=1024, messages=[{ "role": "user", "content": [ { "type": "image", "source": { "type": "base64", "media_type": "image/jpeg", "data": image_data } }, {"type": "text", "text": "이 이미지를 설명해 주세요"} ] }] )

일반적인 사용 사례

  • 문서 OCR — 이미지에서 텍스트와 표 추출
  • 코드 스크린샷 분석 — 스크린샷의 코드를 분석하고 수정 제안 제공
  • UI 검토 — 인터페이스 디자인과 레이아웃 분석
  • 차트 해석 — 데이터 차트와 시각화 콘텐츠 분석
  • 물체 인식 — 이미지 내 물체와 장면 식별
Last updated on