DeepSeek API
🇰🇷 Korea
  • 🇺🇸 English
  • 🇯🇵 Japanese
  • 🇰🇷 Korea
  • 🇵🇹 Portuguese
  1. API 참조
DeepSeek API
🇰🇷 Korea
  • 🇺🇸 English
  • 🇯🇵 Japanese
  • 🇰🇷 Korea
  • 🇵🇹 Portuguese
  • 빨리 시작하십시오
    • 첫 번째 API 호출
    • 모델 및 가격
    • 온도 매개 변수
    • 토큰 및 토큰 사용
    • 한계
    • 오류 코드
  • API 참조
    • 소개
    • 채팅 완료를 만듭니다
      POST
    • FIM 완료 생성 (Beta)
      POST
    • 모델을 나열합니다
      GET
    • 사용자 균형을 얻으십시오
      GET
  • API 가이드
    • 추론 모델 (Deepseek Reautoner)
    • 여러 라운드의 대화
    • 채팅 접두사 완료 (Beta)
    • FIM 완료 (Beta)
    • JSON 출력
    • 기능 호출
    • 컨텍스트 캐싱
  • FAQ
    • FAQ
  1. API 참조

FIM 완료 생성 (Beta)

POST
https://api.deepseek.com/beta/completions
FIM (중간 필드) 완료 API. 이 기능을 사용하려면 사용자가`base_url = "https://api.deepseek.com/beta를 설정해야합니다.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.deepseek.com/beta/completions' \
--header 'Authorization: Bearer ' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "deepseek-chat",
  "prompt": "Once upon a time, ",
  "echo": false,
  "frequency_penalty": 0,
  "logprobs": 0,
  "max_tokens": 1024,
  "presence_penalty": 0,
  "stop": null,
  "stream": false,
  "stream_options": null,
  "suffix": null,
  "temperature": 1,
  "top_p": 1
}'
Response Response Example
{
  "id": "string",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "logprobs": {
        "text_offset": [
          0
        ],
        "token_logprobs": [
          0
        ],
        "tokens": [
          "string"
        ],
        "top_logprobs": [
          {}
        ]
      },
      "text": "string"
    }
  ],
  "created": 0,
  "model": "string",
  "system_fingerprint": "string",
  "object": "text_completion",
  "usage": {
    "completion_tokens": 0,
    "prompt_tokens": 0,
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 0,
    "total_tokens": 0,
    "completion_tokens_details": {
      "reasoning_tokens": 0
    }
  }
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params
Content-Type
string 
required
Example:
application/json
Authorization
string 
required
Example:
Bearer {{API_KEY}}
Body Params application/json
model
string 
required
prompt
string 
required
echo
boolean 
required
frequency_penalty
integer 
required
logprobs
integer 
required
max_tokens
integer 
required
presence_penalty
integer 
required
stop
null 
required
stream
boolean 
required
stream_options
null 
required
suffix
null 
required
temperature
integer 
required
top_p
integer 
required
Examples

Responses

🟢200Success
application/json
Body
id
string 
required
choices
array [object {4}] 
required
finish_reason
string 
optional
index
integer 
optional
logprobs
object 
optional
text
string 
optional
created
integer 
required
model
string 
required
system_fingerprint
string 
required
object
string 
required
usage
object 
required
completion_tokens
integer 
required
prompt_tokens
integer 
required
prompt_cache_hit_tokens
integer 
required
prompt_cache_miss_tokens
integer 
required
total_tokens
integer 
required
completion_tokens_details
object 
required
Previous
채팅 완료를 만듭니다
Next
모델을 나열합니다
Built with