메인 콘텐츠로 건너뛰기
POST
Chat completion with vision: DeepSeek V4 Flash Vision
테스트하기 전에 token이 default 그룹에 있는지 확인하십시오.ClaudeCode token도 여기서는 여전히 200을 반환하지만, detail, 사고 토글 및 logprobs이 모두 작동을 멈추고 응답에서 completion_tokens_details 필드가 사라집니다 —— 실제로는 그룹이 잘못된 것인데 매개변수를 잘못 작성한 것처럼 보입니다. Anthropic 형식에는 대신 Messages Playground를 사용하십시오.
오른쪽의 플레이그라운드를 사용하여 직접 테스트하십시오. Bearer sk-your-api-key을 Authorization에 입력하십시오. 예제에서는 공개 이미지를 사용하고 사고 기능이 비활성화되어 있으므로 보내기를 눌러 즉시 응답을 확인할 수 있습니다. 로컬 파일의 경우 image_url.url을 data:image/jpeg;base64,<BASE64>로 변경하십시오.

매개변수 빠른 참조

이미지를 전송하는 세 가지 방법

image_url과 base64 데이터 URL 사용

image_url와 공개 링크 사용

URL은 최대 8192자이며 60초 이내에 다운로드되어야 합니다.

file 블록과 file_data 사용

token 비용은 image_url 채널과 동일합니다(어느 방법이든 동일한 이미지에 303).
file 블록의 detail은 조용히 무시됩니다 —— 오류도 발생하지 않으며 저장되지도 않습니다. detail: "low"을 사용하려면 image_url 채널을 통해 이미지를 전송하십시오.또한, file_id(Files API)는 이 플랫폼에서 사용할 수 없습니다. 이를 전달하면 invalid file_id이 반환됩니다.

detail이 얼마나 절약하는지

네 가지 수준에서 동일한 1600×1200 이미지: 이미지 유형 식별, 주제 인식 또는 대략적인 분류에는 low이면 충분합니다. 작은 텍스트나 차트 값을 읽을 때는 original을 사용합니다. 열거형에 없는 값은 즉시 오류를 발생시킵니다: unknown variant 'ultra', expected one of 'low', 'high', 'original', 'auto'.

이미지가 tokens가 되는 방식

이미지당 384가 상한입니다. 여러 이미지는 독립적으로 계산되며 선형적으로 합산됩니다. 업로드 전에 미리 압축하면 대역폭은 절약되지만 tokens는 절약되지 않습니다 —— 2000²와 4000²는 정확히 동일한 수로 변환됩니다. 전체 규칙은 개요에서 확인할 수 있습니다.

사고를 비활성화하는 두 가지 방법

두 방법 모두 검증되었습니다(각각 세 번 실행: prompt_tokens는 303에서 223으로 감소하고 reasoning_content는 사라집니다). reasoning: {"effort": "none"} 및 enable_thinking: false은 작동하지 않습니다.
너무 작은 max_tokens은 빈 content을 반환합니다. 사고를 활성화하면 한 줄짜리 질문도 먼저 수백 개의 reasoning token을 출력할 수 있습니다. 예산이 소진되면 finish_reason: "length"과 빈 문자열을 받게 되며 —— 이는 모델이 응답하지 못한 것으로 쉽게 오해할 수 있습니다. 사고를 활성화한 상태에서는 2000 이상을 사용하거나, 간단히 비활성화하십시오.

구조화된 출력이 필요하십니까? 도구를 사용하십시오

response_format: {"type": "json_schema"}은 This response_format type is unavailable now을 반환합니다(상위 모델의 제한 사항입니다). json_object은 작동하지만 필드를 제한하지 않습니다. 강제 적용하려면 함수 호출을 사용하십시오.
도구 인수도 스트리밍 증분에서 올바르게 조합됩니다.

일반적인 오류

인증

Authorization
string
header
필수

The API Key from the APIYI console; the token must be in the default group

본문

application/json
model
enum<string>
기본값:deepseek-v4-flash-vision-exp
필수

Model ID, always deepseek-v4-flash-vision-exp

사용 가능한 옵션:
deepseek-v4-flash-vision-exp
messages
object[]
필수

Message array. content is either a plain string or an array of content parts for mixed text and images

max_tokens
integer
기본값:800

Output token budget, hard ceiling 393,216. Thinking text counts against it, so use 2000 or more with thinking on, otherwise content may come back empty

필수 범위: x <= 393216
thinking
object

Thinking toggle. Pass {"type": "disabled"} to turn it off, saving 80 input tokens and all reasoning output. Only effective in the default group

reasoning_effort
enum<string>

Reasoning depth. In testing none reliably disables thinking; low/high/max showed no stable difference. Only effective in the default group

사용 가능한 옵션:
none,
low,
medium,
high,
max
stream
boolean
기본값:false

Stream the response over SSE. Pair with stream_options.include_usage to get usage in the final chunk

response_format
object

Output format. Only {"type": "json_object"} works; json_schema returns This response_format type is unavailable now

temperature
number

Sampling temperature

top_p
number

Nucleus sampling threshold

stop
string[]

Stop sequences

seed
integer

Random seed

logprobs
boolean

Return token log probabilities; populated in testing (default group only)

top_logprobs
integer

Number of candidates per position, range 0-20

필수 범위: 0 <= x <= 20
tools
object[]

Function Call tool list in OpenAI format. Use it instead of json_schema when you need structured output

응답

Chat completion succeeded

id
string

Request ID

object
string
model
string
choices
object[]

Completion results. Besides content, message carries reasoning_content when thinking is on

usage
object

Usage. Tokens converted from images are included in prompt_tokens