Skip to main content
OpenAI빠름울트라

GPT-4o

OpenAI의 플래그십 멀티모달 모델입니다. 추론, 코딩, 창의적 작업에서 업계 최고 성능을 제공하며, 네이티브 비전 기능과 구조화된 출력을 지원합니다.

3 크레딧
1K 토큰당 (평균)
네이티브 멀티모달 (텍스트 + 비전 + 오디오)
128K 컨텍스트 윈도우
16K 최대 출력 토큰
함수 호출 & JSON 모드
구조화된 출력
이미지 이해 및 분석

모델 상세 사양

컨텍스트 윈도우
128K
토큰
최대 출력
16K
토큰
학습 데이터
2023-10
호환 SDK
OpenAI

기능 지원

비전
함수 호출
스트리밍
JSON 모드
시스템 프롬프트

토큰별 가격 (1M 토큰당)

토큰 종류크레딧달러 환산
입력 토큰2,500$2.50
출력 토큰10,000$10.00
캐시된 토큰1,250$1.25

* 1 크레딧 ≈ $0.001 (실제 요금은 사용량에 따라 달라질 수 있습니다)

빠른 시작

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "model": "gpt-4o",
  "input": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Explain quantum computing in simple terms."
      }
    ],
    "temperature": 0.7,
    "max_tokens": 1000
  }
}'

파라미터

파라미터타입필수기본값설명
messagesarrayYes-role과 content를 포함한 메시지 객체 배열
modelstringYesgpt-4o모델 식별자
temperaturefloatNo1.0샘플링 온도 (0-2). 낮을수록 집중적, 높을수록 창의적
max_tokensintegerNo4096응답의 최대 토큰 수 (최대 16384)
streambooleanNofalseServer-Sent Events 스트리밍 활성화
response_formatobjectNo-응답 형식: JSON 모드의 경우 { type: 'json_object' }
toolsarrayNo-모델이 호출할 수 있는 도구(함수) 목록
top_pfloatNo1.0핵 샘플링 임계값 (0-1)

예제

기본 채팅

모델과의 간단한 대화

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "model": "gpt-4o",
  "input": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Explain quantum computing in simple terms."
      }
    ],
    "temperature": 0.7,
    "max_tokens": 1000
  }
}'

코드 생성

설명과 함께 Python 코드 생성

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "model": "gpt-4o",
  "input": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are an expert Python developer. Write clean, well-documented code."
      },
      {
        "role": "user",
        "content": "Write a Python class for a binary search tree with insert, search, and delete methods."
      }
    ],
    "temperature": 0.3,
    "max_tokens": 2000
  }
}'

JSON 모드

구조화된 JSON 출력 받기

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "model": "gpt-4o",
  "input": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "system",
        "content": "You are a data extraction assistant. Always respond with valid JSON."
      },
      {
        "role": "user",
        "content": "Extract the following info from this text: 'John Smith, 35 years old, software engineer at Google, living in San Francisco'. Return as JSON with fields: name, age, job, company, city"
      }
    ],
    "response_format": {
      "type": "json_object"
    },
    "max_tokens": 500
  }
}'

비전 분석

GPT-4o로 이미지 분석

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "model": "gpt-4o",
  "input": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "What's in this image? Describe it in detail."
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/image.jpg"
            }
          }
        ]
      }
    ],
    "max_tokens": 1000
  }
}'

함수 호출

모델과 함께 도구/함수 사용

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "model": "gpt-4o",
  "input": {
    "model": "gpt-4o",
    "messages": [
      {
        "role": "user",
        "content": "What's the weather like in Seoul today?"
      }
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "get_weather",
          "description": "Get current weather for a location",
          "parameters": {
            "type": "object",
            "properties": {
              "location": {
                "type": "string",
                "description": "City name"
              },
              "unit": {
                "type": "string",
                "enum": [
                  "celsius",
                  "fahrenheit"
                ]
              }
            },
            "required": [
              "location"
            ]
          }
        }
      }
    ]
  }
}'

팁 & 모범 사례

1시스템 메시지로 동작과 제약 조건 설정
2사실적/코딩 작업에는 낮은 온도 (0.1-0.3)
3창의적 글쓰기에는 높은 온도 (0.7-1.0)
4구조화된 데이터 추출에는 JSON 모드 활성화
5도구 통합에는 함수 호출 사용
6비전은 URL 또는 base64 인코딩 이미지와 함께 작동
7스트리밍으로 첫 토큰까지의 시간 대폭 단축

사용 사례

복잡한 추론 및 분석
코드 생성 및 디버깅
콘텐츠 제작 및 편집
문서/이미지에서 데이터 추출
다단계 작업 자동화
고객 지원 챗봇

모델 정보

제공자OpenAI
버전2024-11-20
카테고리LLM
가격3 크레딧

API Endpoint

POST /llm/openai/v1/chat/completions
Playground에서 테스트문서로 돌아가기