{
  "openapi": "3.1.0",
  "info": {
    "title": "Doubao Seed 2.0 Responses API 전체 API 레퍼런스",
    "description": "Doubao Seed 2.0 Responses API 전체 레퍼런스, 모든 파라미터 및 고급 기능 포함",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://direct.evolink.ai",
      "description": "프로덕션 (권장)"
    },
    {
      "url": "https://api.evolink.ai",
      "description": "대체 URL"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/responses": {
      "post": {
        "summary": "Doubao Seed 2.0 Responses API",
        "description": "- Responses API 형식으로 Doubao Seed 2.0 시리즈 모델 호출\n- **서버 측 컨텍스트 저장**: `previous_response_id`를 통한 다중 턴 대화, 수동으로 이전 메시지를 전달할 필요 없음\n- **멀티모달 입력**: 텍스트 + 이미지 + 비디오 + 파일 (PDF) 혼합 입력 지원\n- **심층 사고**: thinking 사고 체인 모드 지원\n- **도구 호출**: Function Calling, 웹 검색, 이미지 처리, MCP 도구, 프라이빗 지식 베이스, Doubao 어시스턴트 지원\n- **컨텍스트 캐시**: caching 캐시 메커니즘으로 비용 절감 지원\n- **구조화된 출력**: JSON Object / JSON Schema 형식 지원\n- **컨텍스트 관리**: context_management 전략 지원\n- 빠르게 시작하시겠습니까? [빠른 시작 문서](/ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-responses-quickstart)를 확인하세요",
        "operationId": "createResponseDoubaoSeed20",
        "tags": [
          "Responses API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponseRequest"
              },
              "examples": {
                "simple_text": {
                  "summary": "텍스트 입력",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "input": "자기소개를 해주세요"
                  }
                },
                "multi_turn": {
                  "summary": "다중 턴 대화 (previous_response_id 사용)",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "input": "어떤 장점이 있나요?",
                    "previous_response_id": "resp_0217****"
                  }
                },
                "message_array": {
                  "summary": "메시지 목록 입력",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "input": [
                      {
                        "role": "system",
                        "type": "message",
                        "content": "You are a professional Python programming assistant."
                      },
                      {
                        "role": "user",
                        "type": "message",
                        "content": "How to read a file?"
                      }
                    ]
                  }
                },
                "thinking_mode": {
                  "summary": "심층 사고 모드 활성화",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "input": "루트 2가 무리수임을 증명하세요",
                    "thinking": {
                      "type": "enabled"
                    }
                  }
                },
                "web_search": {
                  "summary": "웹 검색 도구 사용",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "input": "오늘 주요 뉴스는 무엇인가요?",
                    "tools": [
                      {
                        "type": "web_search"
                      }
                    ]
                  }
                },
                "function_calling": {
                  "summary": "Function Calling",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "input": "서울의 현재 날씨는 어떤가요?",
                    "tools": [
                      {
                        "type": "function",
                        "name": "get_weather",
                        "description": "Get current weather for a city",
                        "parameters": {
                          "type": "object",
                          "properties": {
                            "city": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "city"
                          ]
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "응답 생성 성공",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseObject"
                }
              }
            }
          },
          "400": {
            "description": "요청 매개변수 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 400,
                    "message": "Invalid request parameters",
                    "type": "invalid_request_error"
                  }
                }
              }
            }
          },
          "401": {
            "description": "인증되지 않음, 토큰이 유효하지 않거나 만료됨",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 401,
                    "message": "Invalid or expired token",
                    "type": "authentication_error"
                  }
                }
              }
            }
          },
          "402": {
            "description": "할당량 부족, 충전 필요",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 402,
                    "message": "Insufficient quota",
                    "type": "insufficient_quota_error",
                    "fallback_suggestion": "https://evolink.ai/dashboard/credits"
                  }
                }
              }
            }
          },
          "403": {
            "description": "접근 권한 없음",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 403,
                    "message": "Access denied for this model",
                    "type": "permission_error",
                    "param": "model"
                  }
                }
              }
            }
          },
          "404": {
            "description": "리소스를 찾을 수 없음",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 404,
                    "message": "Specified model not found",
                    "type": "not_found_error",
                    "param": "model",
                    "fallback_suggestion": "doubao-seed-2.0-pro"
                  }
                }
              }
            }
          },
          "413": {
            "description": "요청 본문이 너무 큼",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 413,
                    "message": "File too large",
                    "type": "request_too_large_error",
                    "fallback_suggestion": "compress file to under 50MB"
                  }
                }
              }
            }
          },
          "429": {
            "description": "요청 빈도 초과",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 429,
                    "message": "Rate limit exceeded",
                    "type": "rate_limit_error",
                    "fallback_suggestion": "retry after 60 seconds"
                  }
                }
              }
            }
          },
          "500": {
            "description": "서버 내부 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 500,
                    "message": "Internal server error",
                    "type": "internal_server_error",
                    "fallback_suggestion": "try again later"
                  }
                }
              }
            }
          },
          "502": {
            "description": "업스트림 서비스 오류",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 502,
                    "message": "Upstream AI service unavailable",
                    "type": "upstream_error",
                    "fallback_suggestion": "try different model"
                  }
                }
              }
            }
          },
          "503": {
            "description": "서비스 일시적으로 사용 불가",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": 503,
                    "message": "Service temporarily unavailable",
                    "type": "service_unavailable_error",
                    "fallback_suggestion": "retry after 30 seconds"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ResponseRequest": {
        "type": "object",
        "required": [
          "model",
          "input"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "채팅 모델 이름\n\n- `doubao-seed-2.0-pro`: 플래그십 버전, 종합 능력 최강, 복잡한 추론 및 고품질 생성에 적합\n- `doubao-seed-2.0-lite`: 경량 버전, 더 빠른 속도, 높은 가성비\n- `doubao-seed-2.0-mini`: 초고속 버전, 가장 빠른 응답, 간단한 작업에 적합\n- `doubao-seed-2.0-code`: 코드 전용 버전, 코드 생성 및 이해에 최적화",
            "enum": [
              "doubao-seed-2.0-pro",
              "doubao-seed-2.0-lite",
              "doubao-seed-2.0-mini",
              "doubao-seed-2.0-code"
            ],
            "default": "doubao-seed-2.0-pro",
            "example": "doubao-seed-2.0-pro"
          },
          "input": {
            "description": "입력 내용, 두 가지 형식 지원:\n\n**1. 텍스트 문자열**: 간단한 텍스트 입력\n\n**2. 메시지 배열**: 다중 턴 대화 및 멀티모달 입력 지원",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InputItem"
                }
              }
            ]
          },
          "instructions": {
            "type": "string",
            "nullable": true,
            "description": "시스템 지시문, 모델의 역할 및 동작 설정\n\n시스템 프롬프트와 유사하지만, 모델이 더 높은 우선순위로 따름"
          },
          "previous_response_id": {
            "type": "string",
            "nullable": true,
            "description": "이전 응답 ID, 다중 턴 대화 구현에 사용\n\n설정 시 서버가 자동으로 이전 대화 컨텍스트를 로드"
          },
          "max_output_tokens": {
            "type": "integer",
            "nullable": true,
            "description": "모델 출력 최대 토큰 수\n\n사고 체인 내용과 응답 내용 포함",
            "example": 32768
          },
          "thinking": {
            "type": "object",
            "description": "심층 사고 모드 제어",
            "properties": {
              "type": {
                "type": "string",
                "description": "사고 모드\n\n- `enabled`: 사고 모드 활성화\n- `disabled`: 사고 모드 비활성화\n- `auto`: 자동 사고 모드",
                "enum": [
                  "enabled",
                  "disabled",
                  "auto"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          "reasoning": {
            "type": "object",
            "description": "심층 사고의 작업량 제한, 줄이면 응답 속도가 빨라지고 토큰 사용량이 줄어듦",
            "properties": {
              "effort": {
                "type": "string",
                "description": "사고 깊이\n\n- `minimal`: 사고 비활성화, 직접 답변\n- `low`: 경량 사고, 빠른 응답 중심\n- `medium`: 균형 모드, 속도와 깊이 모두 고려\n- `high`: 심층 분석, 복잡한 문제 처리",
                "enum": [
                  "minimal",
                  "low",
                  "medium",
                  "high"
                ],
                "default": "medium"
              }
            }
          },
          "caching": {
            "type": "object",
            "description": "컨텍스트 캐시 활성화 여부\n\n**참고**: instructions 필드, tools (Function Calling 제외) 필드와 함께 사용할 수 없습니다",
            "properties": {
              "type": {
                "type": "string",
                "description": "캐시 스위치\n\n- `enabled`: 캐시 활성화\n- `disabled`: 캐시 비활성화",
                "enum": [
                  "enabled",
                  "disabled"
                ],
                "default": "disabled"
              },
              "prefix": {
                "type": "boolean",
                "description": "공통 접두사 캐시만 생성할지 여부 (모델이 응답하지 않음)\n\n- `true`: 공통 접두사 캐시만 생성\n- `false`: 공통 접두사 캐시를 생성하지 않음",
                "default": false
              }
            },
            "required": [
              "type"
            ]
          },
          "store": {
            "type": "boolean",
            "nullable": true,
            "description": "생성된 모델 응답을 저장하여 나중에 API를 통해 검색할 수 있도록 할지 여부\n\n- `true`: 현재 모델 응답 저장\n- `false`: 저장하지 않음",
            "default": true
          },
          "stream": {
            "type": "boolean",
            "nullable": true,
            "description": "응답 내용의 스트리밍 반환 여부\n\n- `false`: 모델이 모든 내용을 생성한 후 한 번에 반환\n- `true`: SSE 프로토콜에 따라 청크 단위로 반환, `data: [DONE]` 메시지로 종료",
            "default": false
          },
          "temperature": {
            "type": "number",
            "nullable": true,
            "description": "샘플링 온도, 출력 무작위성 제어\n\n- 값 범위: [0, 2]\n- 낮은 값은 더 확정적, 높은 값은 더 무작위적\n- temperature 또는 top_p 중 하나만 조정 권장\n\n**참고**: doubao-seed-2.0-pro 및 doubao-seed-2.0-lite는 1로 고정, 수동 지정 시 무시됨",
            "minimum": 0,
            "maximum": 2,
            "default": 1
          },
          "top_p": {
            "type": "number",
            "nullable": true,
            "description": "핵 샘플링 확률 임계값\n\n- 값 범위: [0, 1]\n- temperature 또는 top_p 중 하나만 조정 권장\n\n**참고**: doubao-seed-2.0-pro 및 doubao-seed-2.0-lite는 0.95로 고정, 수동 지정 시 무시됨",
            "minimum": 0,
            "maximum": 1,
            "default": 0.7
          },
          "text": {
            "type": "object",
            "description": "모델 텍스트 출력의 형식 정의",
            "properties": {
              "format": {
                "type": "object",
                "description": "모델 텍스트 출력 형식 지정",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "형식 유형\n\n- `text`: 자연어 (기본값)\n- `json_object`: JSON 객체 형식\n- `json_schema`: schema 정의를 따르는 JSON 형식",
                    "enum": [
                      "text",
                      "json_object",
                      "json_schema"
                    ],
                    "default": "text"
                  },
                  "name": {
                    "type": "string",
                    "description": "JSON 구조 이름 (type이 json_schema일 때 필수)"
                  },
                  "schema": {
                    "type": "object",
                    "description": "JSON Schema 형식 정의 (type이 json_schema일 때 필수)"
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "응답 용도 설명"
                  },
                  "strict": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "엄격 준수 모드 활성화 여부",
                    "default": false
                  }
                },
                "required": [
                  "type"
                ]
              }
            }
          },
          "tools": {
            "type": "array",
            "nullable": true,
            "description": "도구 목록, 다양한 도구 유형 지원",
            "items": {
              "$ref": "#/components/schemas/ToolDefinition"
            }
          },
          "context_management": {
            "$ref": "#/components/schemas/ContextManagement"
          }
        }
      },
      "InputItem": {
        "type": "object",
        "description": "입력 항목, 다양한 유형의 메시지 지원",
        "properties": {
          "role": {
            "type": "string",
            "description": "메시지 역할\n\n- `user`: 사용자 메시지\n- `assistant`: AI 어시스턴트 메시지\n- `system`: 시스템 프롬프트\n- `developer`: 개발자 메시지",
            "enum": [
              "user",
              "assistant",
              "system",
              "developer"
            ]
          },
          "type": {
            "type": "string",
            "description": "입력 항목 유형\n\n- `message`: 일반 메시지\n- `function_call`: 함수 호출 (이전 대화의 도구 호출 기록)\n- `function_call_output`: 함수 호출 결과\n- `reasoning`: 사고 체인 기록\n- `item_reference`: 이전 응답의 출력 항목 참조",
            "enum": [
              "message",
              "function_call",
              "function_call_output",
              "reasoning",
              "item_reference"
            ]
          },
          "content": {
            "description": "메시지 내용, 텍스트 문자열 또는 멀티모달 내용 배열 지원",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InputContentPart"
                }
              }
            ]
          },
          "partial": {
            "type": "boolean",
            "description": "이어쓰기 모드 (assistant 역할만 해당)\n\n마지막 assistant 메시지의 partial을 true로 설정하면, 모델이 content 내용을 기반으로 이어서 작성"
          },
          "status": {
            "type": "string",
            "description": "항목 상태",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          },
          "arguments": {
            "type": "string",
            "description": "함수 매개변수의 JSON 문자열 (type이 function_call일 때 필수)"
          },
          "call_id": {
            "type": "string",
            "description": "함수 도구 호출의 고유 ID (type이 function_call/function_call_output일 때 필수)"
          },
          "name": {
            "type": "string",
            "description": "함수 이름 (type이 function_call일 때 필수)"
          },
          "output": {
            "type": "string",
            "description": "도구 출력 결과 (type이 function_call_output일 때 필수)"
          },
          "id": {
            "type": "string",
            "description": "사고 체인 정보의 고유 식별자 (type이 reasoning일 때)"
          },
          "summary": {
            "type": "array",
            "description": "사고 체인 내용 (type이 reasoning일 때)",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "summary_text"
                  ]
                }
              }
            }
          }
        }
      },
      "InputContentPart": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InputText"
          },
          {
            "$ref": "#/components/schemas/InputImage"
          },
          {
            "$ref": "#/components/schemas/InputVideo"
          },
          {
            "$ref": "#/components/schemas/InputFile"
          }
        ]
      },
      "InputText": {
        "title": "텍스트 입력",
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_text"
            ],
            "description": "입력 유형, input_text로 고정"
          },
          "text": {
            "type": "string",
            "description": "입력 텍스트 내용"
          }
        }
      },
      "InputImage": {
        "title": "이미지 입력",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_image"
            ],
            "description": "입력 유형, input_image로 고정"
          },
          "image_url": {
            "type": "string",
            "description": "이미지 URL 또는 Base64 인코딩된 data URL"
          },
          "file_id": {
            "type": "string",
            "description": "Files API를 통해 업로드 후 반환된 파일 ID"
          },
          "detail": {
            "type": "string",
            "description": "이미지 이해 정밀도\n\n- `low`: 낮은 정밀도\n- `high`: 높은 정밀도\n- `xhigh`: 초고 정밀도",
            "enum": [
              "low",
              "high",
              "xhigh"
            ]
          }
        }
      },
      "InputVideo": {
        "title": "비디오 입력",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_video"
            ],
            "description": "입력 유형, input_video로 고정"
          },
          "video_url": {
            "type": "string",
            "description": "비디오 URL 또는 Base64 인코딩된 data URL"
          },
          "file_id": {
            "type": "string",
            "description": "Files API를 통해 업로드 후 반환된 파일 ID"
          },
          "fps": {
            "type": "number",
            "description": "프레임 추출 빈도\n\n- 값 범위: [0.2, 5]",
            "minimum": 0.2,
            "maximum": 5,
            "default": 1
          }
        }
      },
      "InputFile": {
        "title": "파일 입력",
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "input_file"
            ],
            "description": "입력 유형, input_file로 고정"
          },
          "file_id": {
            "type": "string",
            "description": "Files API를 통해 업로드 후 반환된 파일 ID"
          },
          "file_data": {
            "type": "string",
            "description": "파일의 Base64 인코딩된 data URL"
          },
          "filename": {
            "type": "string",
            "description": "파일 이름"
          }
        }
      },
      "ToolDefinition": {
        "type": "object",
        "description": "도구 정의. type 필드에 따라 다른 도구 유형 선택",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "도구 유형\n\n- `function`: 사용자 정의 함수\n- `web_search`: 웹 검색\n- `doubao_app`: Doubao 어시스턴트\n- `image_process`: 이미지 처리\n- `mcp`: MCP 도구\n- `knowledge_search`: 프라이빗 지식 베이스 검색",
            "enum": [
              "function",
              "web_search",
              "doubao_app",
              "image_process",
              "mcp",
              "knowledge_search"
            ]
          },
          "name": {
            "type": "string",
            "description": "함수 이름 (type이 function일 때 필수)"
          },
          "description": {
            "type": "string",
            "description": "함수 설명 / 지식 베이스 설명"
          },
          "parameters": {
            "type": "object",
            "description": "함수 매개변수, JSON Schema 형식 (type이 function일 때)"
          },
          "strict": {
            "type": "boolean",
            "description": "엄격한 매개변수 검증 강제 여부 (type이 function일 때)",
            "default": true
          },
          "feature": {
            "type": "object",
            "description": "Doubao 어시스턴트 하위 기능 (type이 doubao_app일 때)",
            "properties": {
              "chat": {
                "type": "object",
                "description": "일상 대화 기능",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "default": "disabled"
                  },
                  "role_description": {
                    "type": "string",
                    "description": "역할 설정 (system prompt / instructions와 상호 배타적)"
                  }
                }
              },
              "deep_chat": {
                "type": "object",
                "description": "심층 대화 기능",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "default": "disabled"
                  },
                  "role_description": {
                    "type": "string",
                    "description": "역할 설정"
                  }
                }
              },
              "ai_search": {
                "type": "object",
                "description": "웹 검색 기능",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "default": "disabled"
                  },
                  "role_description": {
                    "type": "string",
                    "description": "역할 설정"
                  }
                }
              },
              "reasoning_search": {
                "type": "object",
                "description": "사고하며 검색 기능",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "default": "disabled"
                  },
                  "role_description": {
                    "type": "string",
                    "description": "역할 설정"
                  }
                }
              }
            }
          },
          "user_location": {
            "type": "object",
            "description": "사용자 위치 정보 (type이 doubao_app일 때)",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "approximate"
                ]
              },
              "city": {
                "type": "string",
                "description": "도시 이름"
              },
              "country": {
                "type": "string",
                "description": "국가 이름"
              },
              "region": {
                "type": "string",
                "description": "지역 이름"
              },
              "timezone": {
                "type": "string",
                "description": "시간대"
              }
            }
          },
          "crop": {
            "type": "object",
            "description": "자르기 기능 (type이 image_process일 때)",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ],
                "default": "enabled"
              }
            }
          },
          "resize": {
            "type": "object",
            "description": "크기 조정 기능 (type이 image_process일 때)",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ],
                "default": "enabled"
              }
            }
          },
          "rotate": {
            "type": "object",
            "description": "회전 기능 (type이 image_process일 때)",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ],
                "default": "enabled"
              }
            }
          },
          "server_label": {
            "type": "string",
            "description": "MCP Server 라벨 (type이 mcp일 때 필수)"
          },
          "server_url": {
            "type": "string",
            "description": "MCP Server 접근 주소 (type이 mcp일 때 필수)"
          },
          "headers": {
            "type": "object",
            "description": "MCP 서버 HTTP 요청 헤더 (type이 mcp일 때)",
            "additionalProperties": {
              "type": "string"
            }
          },
          "require_approval": {
            "description": "MCP 도구 승인 설정 (type이 mcp일 때)\n\n**문자열 모드**: `always` (모두 확인 필요) / `never` (확인 불필요)\n\n**객체 모드**: 어떤 도구가 승인 필요/불필요한지 지정",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "always": {
                    "type": "object",
                    "properties": {
                      "tool_names": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "확인이 필요한 도구 이름 목록"
                      }
                    }
                  },
                  "never": {
                    "type": "object",
                    "properties": {
                      "tool_names": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "확인이 불필요한 도구 이름 목록"
                      }
                    }
                  }
                }
              }
            ]
          },
          "allowed_tools": {
            "description": "MCP 도구 로드 범위 (type이 mcp일 때)\n\n**배열 모드**: 로드 허용할 도구 이름 목록\n\n**객체 모드**: tool_names로 지정",
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "object",
                "properties": {
                  "tool_names": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            ]
          },
          "knowledge_resource_id": {
            "type": "string",
            "description": "프라이빗 지식 베이스 ID (type이 knowledge_search일 때 필수)"
          },
          "doc_filters": {
            "type": "object",
            "description": "지식 베이스 검색 필터 조건 (type이 knowledge_search일 때)"
          },
          "dense_weight": {
            "type": "number",
            "description": "밀집 벡터 가중치 (type이 knowledge_search일 때)\n\n- 값 범위: [0.2, 1]\n- 1은 순수 밀집 검색, 0에 가까울수록 순수 리터럴 검색\n- 하이브리드 검색 (hnsw_hybrid)에서만 유효",
            "minimum": 0.2,
            "maximum": 1,
            "default": 0.5
          },
          "ranking_options": {
            "type": "object",
            "description": "지식 베이스 검색 후처리 옵션 (type이 knowledge_search일 때)",
            "properties": {
              "rerank_switch": {
                "type": "boolean",
                "description": "자동 rerank 여부",
                "default": false
              },
              "retrieve_count": {
                "type": "integer",
                "description": "검색 결과 수",
                "default": 10
              },
              "score_threshold": {
                "type": "number",
                "description": "점수 임계값, 이 값 이하의 결과는 필터링됨",
                "default": 0
              },
              "score_threshold_enabled": {
                "type": "boolean",
                "description": "점수 임계값 필터링 활성화 여부",
                "default": false
              }
            }
          }
        }
      },
      "ContextManagement": {
        "type": "object",
        "description": "컨텍스트 관리 전략, 긴 대화에서 컨텍스트 길이 초과 방지",
        "properties": {
          "type": {
            "type": "string",
            "description": "관리 전략 유형\n\n- `truncation`: 잘라내기 전략, 오래된 메시지 자동 제거\n- `clear_thinking`: 사고 체인 정리 전략\n- `clear_tool_uses`: 도구 호출 정리 전략",
            "enum": [
              "truncation",
              "clear_thinking",
              "clear_tool_uses"
            ]
          },
          "retain": {
            "description": "보존 전략 (type이 clear_thinking/clear_tool_uses일 때)",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "last_turn"
                ],
                "description": "마지막 턴만 보존"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "보존 전략 유형\n\n- `thinking_turns`: 최근 N턴 사고 체인 보존\n- `tool_uses`: 최근 N턴 도구 호출 보존",
                    "enum": [
                      "thinking_turns",
                      "tool_uses"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "description": "보존 턴 수",
                    "default": 1
                  }
                }
              }
            ]
          },
          "exclude_tools": {
            "type": "array",
            "description": "정리되지 않을 도구 이름 목록 (type이 clear_tool_uses일 때)",
            "items": {
              "type": "string"
            }
          },
          "clear_tool_input": {
            "type": "boolean",
            "description": "도구 호출 매개변수 정리 여부 (type이 clear_tool_uses일 때)",
            "default": false
          },
          "trigger": {
            "type": "object",
            "description": "정리 전략 트리거 임계값 (type이 clear_tool_uses일 때)",
            "properties": {
              "type": {
                "type": "string",
                "description": "트리거 유형\n\n- `token_count`: 토큰 수가 N에 도달하면 정리 트리거\n- `tool_call_count`: 도구 호출이 N턴에 도달하면 정리 트리거",
                "enum": [
                  "token_count",
                  "tool_call_count"
                ]
              },
              "value": {
                "type": "integer",
                "description": "도구 호출이 N턴에 도달하면 정리 트리거"
              }
            }
          }
        }
      },
      "ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "이번 응답의 고유 식별자",
            "example": "resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e"
          },
          "object": {
            "type": "string",
            "description": "객체 유형, response로 고정",
            "enum": [
              "response"
            ],
            "example": "response"
          },
          "created_at": {
            "type": "number",
            "description": "생성 시간의 Unix 타임스탬프 (초)",
            "example": 1771486674
          },
          "model": {
            "type": "string",
            "description": "실제 사용된 모델 이름 및 버전",
            "example": "doubao-seed-2-0-code-preview-260215"
          },
          "status": {
            "type": "string",
            "description": "응답 상태\n\n- `completed`: 생성 완료\n- `in_progress`: 생성 중\n- `incomplete`: 미완료\n- `failed`: 실패",
            "enum": [
              "completed",
              "in_progress",
              "incomplete",
              "failed"
            ],
            "example": "completed"
          },
          "output": {
            "type": "array",
            "description": "모델 출력 내용 목록, 사고 체인 출력, 메시지 출력, 도구 호출 출력 등 포함",
            "items": {
              "$ref": "#/components/schemas/OutputItem"
            }
          },
          "service_tier": {
            "type": "string",
            "description": "이번 요청의 서비스 등급\n\n- `default`: 기본 서비스 등급\n- `scale`: 보장 패키지 할당량 사용",
            "example": "default"
          },
          "instructions": {
            "type": "string",
            "nullable": true,
            "description": "이번 요청에 사용된 시스템 지시문"
          },
          "previous_response_id": {
            "type": "string",
            "nullable": true,
            "description": "참조된 이전 응답 ID"
          },
          "max_output_tokens": {
            "type": "integer",
            "description": "모델 출력 최대 토큰 수",
            "example": 32768
          },
          "temperature": {
            "type": "number",
            "nullable": true,
            "description": "사용된 샘플링 온도"
          },
          "top_p": {
            "type": "number",
            "nullable": true,
            "description": "사용된 핵 샘플링 확률"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "caching": {
            "type": "object",
            "description": "캐시 설정",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "enabled",
                  "disabled"
                ]
              }
            }
          },
          "store": {
            "type": "boolean",
            "description": "응답 저장 여부",
            "example": true
          },
          "expire_at": {
            "type": "integer",
            "description": "저장 만료 시간 (Unix 타임스탬프)",
            "example": 1771745874
          },
          "error": {
            "type": "object",
            "nullable": true,
            "description": "오류 정보, 성공 시 null"
          }
        }
      },
      "OutputItem": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ReasoningOutput"
          },
          {
            "$ref": "#/components/schemas/MessageOutput"
          },
          {
            "$ref": "#/components/schemas/FunctionCallOutput"
          }
        ]
      },
      "ReasoningOutput": {
        "title": "사고 체인 출력",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "출력 항목 ID",
            "example": "rs_0217****404a"
          },
          "type": {
            "type": "string",
            "description": "출력 유형",
            "enum": [
              "reasoning"
            ]
          },
          "summary": {
            "type": "array",
            "description": "사고 체인 내용",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "사고 체인 텍스트"
                },
                "type": {
                  "type": "string",
                  "description": "유형, summary_text로 고정",
                  "enum": [
                    "summary_text"
                  ]
                }
              }
            }
          },
          "status": {
            "type": "string",
            "description": "상태",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ],
            "example": "completed"
          }
        }
      },
      "MessageOutput": {
        "title": "메시지 출력",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "출력 항목 ID",
            "example": "msg_0217****a93c"
          },
          "type": {
            "type": "string",
            "enum": [
              "message"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "assistant"
            ]
          },
          "content": {
            "type": "array",
            "description": "메시지 내용 목록",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "텍스트 내용"
                },
                "type": {
                  "type": "string",
                  "description": "내용 유형",
                  "enum": [
                    "output_text"
                  ]
                },
                "annotations": {
                  "type": "array",
                  "nullable": true,
                  "description": "주석 정보 (웹 검색 출처 등)"
                }
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ],
            "example": "completed"
          }
        }
      },
      "FunctionCallOutput": {
        "title": "도구 호출 출력",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "출력 항목 ID"
          },
          "type": {
            "type": "string",
            "enum": [
              "function_call"
            ]
          },
          "call_id": {
            "type": "string",
            "description": "호출 ID"
          },
          "name": {
            "type": "string",
            "description": "함수 이름"
          },
          "arguments": {
            "type": "string",
            "description": "함수 매개변수 JSON 문자열"
          },
          "status": {
            "type": "string",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ]
          }
        }
      },
      "Usage": {
        "type": "object",
        "description": "토큰 사용 통계 정보",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "description": "입력 토큰 수",
            "example": 88
          },
          "input_tokens_details": {
            "type": "object",
            "description": "입력 토큰 상세 정보",
            "properties": {
              "cached_tokens": {
                "type": "integer",
                "description": "캐시 토큰 수",
                "example": 0
              }
            }
          },
          "output_tokens": {
            "type": "integer",
            "description": "출력 토큰 수",
            "example": 230
          },
          "output_tokens_details": {
            "type": "object",
            "description": "출력 토큰 상세 정보",
            "properties": {
              "reasoning_tokens": {
                "type": "integer",
                "description": "추론/사고 체인 토큰 수",
                "example": 211
              }
            }
          },
          "total_tokens": {
            "type": "integer",
            "description": "총 토큰 수",
            "example": 318
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer",
                "description": "HTTP 상태 오류 코드"
              },
              "message": {
                "type": "string",
                "description": "오류 설명"
              },
              "type": {
                "type": "string",
                "description": "오류 유형"
              },
              "param": {
                "type": "string",
                "description": "관련 매개변수 이름"
              },
              "fallback_suggestion": {
                "type": "string",
                "description": "오류 시 제안"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "##모든 API는 Bearer Token 인증이 필요합니다##\n\n**API Key 받기:**\n\n[API Key 관리 페이지](https://evolink.ai/dashboard/keys)를 방문하여 API Key를 받으세요\n\n**요청 헤더에 추가:**\n```\nAuthorization: Bearer YOUR_API_KEY\n```"
      }
    }
  },
  "tags": [
    {
      "name": "Responses API",
      "description": "Responses API 채팅 생성 인터페이스"
    }
  ]
}
