OpenAI의 코딩 및 지시 따르기에 가장 뛰어난 모델입니다. 1M 토큰 컨텍스트 윈도우, 32K 출력 토큰을 지원하며, 코딩, 복잡한 프롬프트, 긴 컨텍스트 작업에서 크게 향상되었습니다. GPT-4o 대비 출력 비용 20% 절감.
이 모델의 사용법을 Claude, ChatGPT 등에 복사
| 토큰 종류 | 크레딧 | 달러 환산 |
|---|---|---|
| 입력 토큰 | 2,000 | $2.00 |
| 출력 토큰 | 8,000 | $8.00 |
| 캐시된 토큰 | 500 | $0.50 |
* 1 크레딧 ≈ $0.001 (실제 요금은 사용량에 따라 달라질 수 있습니다)
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "system",
"content": "You are an expert code reviewer. Analyze the codebase and suggest improvements."
},
{
"role": "user",
"content": "Review this Python project and identify potential performance bottlenecks, security issues, and suggest refactoring opportunities."
}
],
"temperature": 0.3,
"max_tokens": 4000
}'| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
messages | array | Yes | - | role과 content를 포함한 메시지 객체 배열 |
model | string | Yes | gpt-4.1 | 모델 식별자 |
temperature | float | No | 1.0 | 샘플링 온도 (0-2). 낮을수록 집중적, 높을수록 창의적 |
max_tokens | integer | No | 4096 | 응답의 최대 토큰 수 (최대 32768) |
stream | boolean | No | false | Server-Sent Events 스트리밍 활성화 |
response_format | object | No | - | 응답 형식: JSON 모드의 경우 { type: 'json_object' } |
tools | array | No | - | 모델이 호출할 수 있는 도구(함수) 목록 |
top_p | float | No | 1.0 | 핵 샘플링 임계값 (0-1) |
1M 컨텍스트로 대규모 코드베이스 분석 및 리팩토링
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "system",
"content": "You are an expert code reviewer. Analyze the codebase and suggest improvements."
},
{
"role": "user",
"content": "Review this Python project and identify potential performance bottlenecks, security issues, and suggest refactoring opportunities."
}
],
"temperature": 0.3,
"max_tokens": 4000
}'정확한 포맷팅을 포함한 복잡한 다단계 작업
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "system",
"content": "Follow the user's instructions exactly. Format output as specified."
},
{
"role": "user",
"content": "Create a technical specification document with sections: Overview, Architecture, API Design, Security Considerations, and Deployment Plan. Use markdown headers and include code examples where relevant."
}
],
"temperature": 0.5,
"max_tokens": 8000
}'비정형 텍스트에서 구조화된 데이터 추출
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-4.1",
"messages": [
{
"role": "system",
"content": "Extract structured data from the given text. Always respond with valid JSON."
},
{
"role": "user",
"content": "Parse this invoice: 'Invoice #2025-0342 from Acme Corp to Beta LLC, dated March 1 2025. Items: 10x Widget A at $25.00, 5x Widget B at $50.00. Tax: 10%. Shipping: $15.00'"
}
],
"response_format": {
"type": "json_object"
},
"max_tokens": 1000
}'POST /llm/openai/v1/chat/completions