curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}
'{
"id": "53ee6690-e14a-4e6b-890b-a135100d51c7",
"type": "message",
"role": "assistant",
"model": "deepseek-v4-flash",
"content": [
{
"type": "thinking",
"thinking": "사용자가 \"일본의 수도\"를 묻고 있습니다. 기초 지리 질문이고 답은 도쿄이므로 바로 답하면 됩니다.",
"signature": "53ee6690-e14a-4e6b-890b-a135100d51c7"
},
{
"type": "text",
"text": "일본의 수도는 **도쿄**입니다."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 7,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 77,
"service_tier": "standard"
}
}DeepSeek V4 - Anthropic 호환 인터페이스
- Anthropic Messages 프로토콜로 DeepSeek V4 모델 호출
deepseek-v4-flash/deepseek-v4-pro/deepseek-v4-flash-vision-exp지원- 요청 / 응답 구조는 Anthropic API와 정렬되어 있음
- 이미지 이해:
deepseek-v4-flash-vision-exp는imagecontent block을 지원하며source.type은base64또는url일 수 있습니다 - 시스템 프롬프트: 최상위
system필드로 전달 - 사고 모드:
thinking객체 스위치; 사고 내용은content[type=thinking]block으로 반환 - 스트리밍 출력: SSE 이벤트 스트림
- 도구 호출: Anthropic
tool_use/tool_result흐름 호환
⚠️ 중요:
deepseek-v4-flash/deepseek-v4-pro에imageblock을 보내도 오류가 발생하지 않지만, 업스트림에서 이미지를[Unsupported Image]플레이스홀더로 대체합니다. 모델은 실제 이미지를 볼 수 없고 요청은 정상적으로 과금됩니다. 이미지 이해가 필요하면 반드시model을deepseek-v4-flash-vision-exp로 지정하세요.
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "deepseek-v4-flash",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "Hello, world"
}
]
}
'{
"id": "53ee6690-e14a-4e6b-890b-a135100d51c7",
"type": "message",
"role": "assistant",
"model": "deepseek-v4-flash",
"content": [
{
"type": "thinking",
"thinking": "사용자가 \"일본의 수도\"를 묻고 있습니다. 기초 지리 질문이고 답은 도쿄이므로 바로 답하면 됩니다.",
"signature": "53ee6690-e14a-4e6b-890b-a135100d51c7"
},
{
"type": "text",
"text": "일본의 수도는 **도쿄**입니다."
}
],
"stop_reason": "end_turn",
"stop_sequence": null,
"usage": {
"input_tokens": 7,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 77,
"service_tier": "standard"
}
}https://direct.evolink.ai이며, 텍스트 모델 지원이 더 우수하고 장시간 연결을 지원합니다. https://api.evolink.ai는 멀티모달 서비스의 주력 엔드포인트이며, 텍스트 모델에 대해서는 대체 주소로 사용됩니다.인증
##모든 인터페이스는 Bearer Token 인증이 필요합니다##
API Key 받기:
API Key 관리 페이지를 방문하여 API Key를 받으세요
사용 시 요청 헤더에 추가:
Authorization: Bearer YOUR_API_KEY
참고: Anthropic 네이티브 API는 x-api-key 헤더를 사용하지만, EvoLink는 /v1/messages에 대해 Bearer Token 인증을 일괄 채택합니다.
본문
호출할 모델
deepseek-v4-flash: 빠른 범용deepseek-v4-pro: 심층 추론deepseek-v4-flash-vision-exp: 이미지 이해를 지원하는 실험 모델이며 텍스트 성능, 매개변수, 가격은 Flash와 동일합니다
팁: 세 모델 모두 기본적으로 thinking이 활성화되어 있어 응답에 항상 type="thinking" content block이 포함됩니다. 끄려면 thinking.type="disabled"를 명시적으로 지정하세요. 지정되지 않았거나 지원되지 않는 model은 자동으로 deepseek-v4-flash에 매핑됩니다.
이미지 이해에는 deepseek-v4-flash-vision-exp가 필요합니다: 나머지 두 모델은 image block을 보내도 오류를 내지 않지만 [Unsupported Image]로 바꾸고 실제 이미지는 버립니다.
실험 버전 안내: -exp는 업스트림 실험 버전을 뜻합니다. 모델 이름과 가용성이 변경될 수 있으므로 프로덕션에서는 대체 경로를 마련하세요.
deepseek-v4-flash, deepseek-v4-pro, deepseek-v4-flash-vision-exp "deepseek-v4-flash"
생성할 최대 token 수 (필수)
설명:
- V4 시리즈는 최대 384,000까지 가능
- thinking에서 생성된 token도 max_tokens 상한에 포함됩니다
1 <= x <= 3840001024
대화 메시지 목록이며 턴별로 user / assistant가 교대합니다
설명:
- 최소 1개의 메시지 포함
- 마지막 메시지는 일반적으로
role=user image콘텐츠 유형은deepseek-v4-flash-vision-exp만 지원하며document는 지원하지 않습니다
1Show child attributes
Show child attributes
시스템 프롬프트, AI 역할 및 동작 설정에 사용
설명:
- 문자열 또는 문자열 배열 지원
- OpenAI 엔드포인트의
system메시지와 달리, Anthropic 엔드포인트는 최상위system필드를 사용합니다
"You are a helpful assistant."
샘플링 온도
설명:
- 범위
[0.0, 2.0] - 기본값 1; 값이 높을수록 발산적이고, 낮을수록 결정적
0 <= x <= 21
핵 샘플링 임계값
설명:
- 범위
[0, 1] - temperature와 top_p를 동시에 조정하지 않는 것을 권장합니다
0 <= x <= 11
사용자 정의 중지 시퀀스
설명:
- 모델이 어떤 문자열이든 만나면 생성을 중단
- 최대 4개 (Anthropic 규격 준수)
4SSE 스트리밍으로 반환할지 여부
true: Server-Sent Events 스트리밍 반환false: 완전한 응답 후 한 번에 반환 (기본값)
false
사고 모드 제어 (V4)
설명:
- 두 모델 모두 기본 활성화 (
type=enabled) - 활성화하면 응답
content배열에type="thinking"의 추론 과정 block이 나타납니다 (출력 token으로 과금) - 주의: 이 API는 Anthropic 네이티브
budget_tokens필드를 무시합니다. 깊이를 제어하려면output_config.effort를 사용하세요 - 다중 턴 대화에서는 이전 턴 응답의 thinking block을 그대로 assistant
content배열에 되돌려 놓으면 됩니다 (Anthropic 프로토콜 스타일은 더 관대하여 thinking이 없어도 오류를 일으키지 않지만, signature를 유지하면 컨텍스트 일관성에 도움이 됩니다)
Show child attributes
Show child attributes
출력 설정 (V4 확장)
설명: Deepseek는 effort 필드만 지원합니다
Show child attributes
Show child attributes
도구 정의 목록
설명:
- Anthropic tool 정의 규격 준수
input_schema는 JSON Schema 객체 사용
Show child attributes
Show child attributes
도구 호출 동작 제어
가능한 type:
auto: 모델이 자동 결정 (tools 제공 시 기본값)any: 어떤 도구든 반드시 호출 (지정 없음)tool: 지정된name을 반드시 호출none: 도구 호출 금지
Show child attributes
Show child attributes
응답
메시지 객체
Anthropic 스타일의 메시지 응답
메시지 고유 ID
응답 객체 유형
message assistant 실제 사용된 모델
"deepseek-v4-pro"
응답 콘텐츠 블록 목록
포함될 수 있는 block type:
thinking: 추론 과정 (thinking 활성화 시에만)text: 최종 응답 텍스트tool_use: 모델이 시작한 도구 호출
Show child attributes
Show child attributes
중지 원인
end_turn: 자연 종료max_tokens: max_tokens 상한 도달stop_sequence: stop_sequences 히트tool_use: 모델이 도구 호출 트리거
end_turn, max_tokens, stop_sequence, tool_use stop_reason=stop_sequence일 때 히트한 구체적인 시퀀스, 그렇지 않으면 null
Token 사용 통계 (Anthropic 규격)
Show child attributes
Show child attributes