대화에 OpenAI Responses API를 사용합니다. Responses API는 더 유연한 입력을 지원하는 최신 OpenAI API 형식입니다.
/api/ai/v1/responsesBearer YOUR_API_KEY| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
model | string | 필수 | 모델 이름, 예: deepseek-v4.1-flash, qwen3.8-max |
input | string | 필수 | 입력 텍스트 또는 대화 내용 |
max_tokens | integer | 선택 | 최대 출력 토큰 수 |
temperature | float | 선택 | 샘플링 온도, 무작위성 조절 (0-2) |
stream | boolean | 선택 | 스트리밍 응답 활성화, SSE 사용 시 true로 설정 |
| 파라미터 | 타입 | 설명 |
|---|---|---|
id | string | 고유 응답 식별자 |
model | string | 실제 사용된 모델 |
output | string | 생성된 텍스트 출력 |
usage | object | 토큰 사용량 통계 (prompt_tokens, completion_tokens, total_tokens 포함) |
curl --location 'https://your-domain.com/api/ai/v1/responses' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000,
"temperature": 0.7
}'import requests
response = requests.post(
"https://your-domain.com/api/ai/v1/responses",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
json={
"model": "deepseek-v4.1-flash",
"input": "Hello, who are you?",
"max_tokens": 1000,
"temperature": 0.7
}
)
print(response.json())curl --location 'https://your-domain.com/api/ai/v1/responses' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"model": "deepseek-v4.1-flash",
"input": "Hello",
"max_tokens": 1000,
"stream": true
}'