Skip to main content
POST
Chat completion with vision: DeepSeek V4 Flash Vision
테스트하기 전에 토큰이 default 그룹에 있는지 확인합니다.ClaudeCode token은 여기에서 여전히 200을 반환하지만, detail, thinking 토글과 logprobs은 모두 작동하지 않고 응답에서 completion_tokens_details 필드가 빠집니다 —— 마치 파라미터를 잘못 작성한 것처럼 보이지만 실제로는 그룹이 잘못된 것입니다. Anthropic 형식의 경우 대신 Messages Playground를 사용합니다.
오른쪽의 플레이그라운드에서 직접 테스트하려면: AuthorizationBearer sk-your-api-key을 넣습니다. 예제는 공개 이미지를 사용하고 thinking이 비활성화되어 있으므로, 전송을 누르면 즉시 응답을 볼 수 있습니다. 로컬 파일의 경우 image_url.urldata:image/jpeg;base64,<BASE64>으로 변경합니다.

매개변수 빠른 참고

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

image_url와 함께 base64 data URL 사용

공개 링크와 함께 image_url 사용

URL은 최대 8192자까지 가능하며, 60초 이내에 다운로드되어야 합니다.

file_data이 포함된 file 블록

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'.

이미지가 token으로 변환되는 방식

이미지당 384가 상한입니다. 여러 이미지는 각각 독립적으로 계산되며 선형으로 합산됩니다. 업로드 전에 미리 압축하면 대역폭은 절약되지만 token은 절약되지 않습니다 —— 2000²와 4000²는 정확히 같은 수로 변환됩니다. 전체 규칙은 개요를 참조하십시오.

추론을 비활성화하는 두 가지 방법

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

구조화된 출력이 필요하신가요? tools를 사용하세요

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

일반적인 오류

인증

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