{
  "openapi": "3.1.0",
  "info": {
    "title": "Doubao Seed 2.0 전체 API 레퍼런스",
    "description": "Doubao Seed 2.0 채팅 인터페이스의 전체 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/chat/completions": {
      "post": {
        "summary": "Doubao Seed 2.0 채팅 인터페이스",
        "description": "- OpenAI SDK 형식으로 Doubao Seed 2.0 시리즈 모델 호출\n- 동기 처리 모드, 실시간 응답\n- **텍스트 채팅**: 단일 또는 다중 턴 컨텍스트 대화\n- **시스템 프롬프트**: AI 역할 및 동작 사용자 정의\n- **멀티모달 입력**: 텍스트 + 이미지 + 비디오 혼합 입력 지원\n- **심층 사고**: 사고 체인 모드를 통한 심층 추론 지원\n- **도구 호출**: Function Calling 지원\n- **구조화된 출력**: JSON Object / JSON Schema 형식 출력 지원\n- 빠르게 시작하시겠습니까? [빠른 시작 문서](/ko/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-quickstart)를 확인하세요",
        "operationId": "createChatCompletionDoubaoSeed20",
        "tags": [
          "채팅 생성"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatCompletionRequest"
              },
              "examples": {
                "simple_text": {
                  "summary": "단일 턴 텍스트 채팅",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "messages": [
                      {
                        "role": "user",
                        "content": "자기소개를 해주세요"
                      }
                    ]
                  }
                },
                "multi_turn": {
                  "summary": "다중 턴 대화 (컨텍스트 이해)",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "messages": [
                      {
                        "role": "user",
                        "content": "Python이란 무엇인가요?"
                      },
                      {
                        "role": "assistant",
                        "content": "Python은 고급 프로그래밍 언어입니다..."
                      },
                      {
                        "role": "user",
                        "content": "어떤 장점이 있나요?"
                      }
                    ]
                  }
                },
                "system_prompt": {
                  "summary": "시스템 프롬프트 사용",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "messages": [
                      {
                        "role": "system",
                        "content": "You are a professional Python programming assistant. Answer questions concisely."
                      },
                      {
                        "role": "user",
                        "content": "How to read a file?"
                      }
                    ]
                  }
                },
                "vision": {
                  "summary": "멀티모달 입력 (텍스트 + 이미지)",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "messages": [
                      {
                        "role": "user",
                        "content": [
                          {
                            "type": "text",
                            "text": "이 이미지의 장면과 주요 요소를 자세히 설명해 주세요."
                          },
                          {
                            "type": "image_url",
                            "image_url": {
                              "url": "https://example.com/image.png"
                            }
                          }
                        ]
                      }
                    ]
                  }
                },
                "thinking_mode": {
                  "summary": "심층 사고 모드 활성화",
                  "value": {
                    "model": "doubao-seed-2.0-pro",
                    "messages": [
                      {
                        "role": "user",
                        "content": "루트 2가 무리수임을 증명하세요"
                      }
                    ],
                    "thinking": {
                      "type": "enabled"
                    },
                    "max_completion_tokens": 16384
                  }
                },
                "code_generation": {
                  "summary": "코드 전용 모델 사용",
                  "value": {
                    "model": "doubao-seed-2.0-code",
                    "messages": [
                      {
                        "role": "system",
                        "content": "You are an advanced programming assistant."
                      },
                      {
                        "role": "user",
                        "content": "Implement a quicksort algorithm in Python"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "채팅 생성 성공",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatCompletionResponse"
                }
              }
            }
          },
          "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": "Image file too large",
                    "type": "request_too_large_error",
                    "param": "content",
                    "fallback_suggestion": "compress image to under 10MB"
                  }
                }
              }
            }
          },
          "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": {
      "ChatCompletionRequest": {
        "type": "object",
        "required": [
          "model",
          "messages"
        ],
        "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"
          },
          "messages": {
            "type": "array",
            "description": "채팅 메시지 목록, 다중 턴 대화 및 멀티모달 입력 (텍스트, 이미지, 비디오) 지원",
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "minItems": 1
          },
          "thinking": {
            "type": "object",
            "description": "모델의 심층 사고 모드 활성화 여부 제어\n\n모델에 따라 지원 여부 및 기본값이 다릅니다",
            "properties": {
              "type": {
                "type": "string",
                "description": "사고 모드\n\n- `enabled`: 사고 모드 활성화, 모델이 먼저 사고한 후 답변\n- `disabled`: 사고 모드 비활성화, 모델이 직접 답변\n- `auto`: 자동 사고 모드, 모델이 질문에 따라 사고 필요 여부를 자체 판단",
                "enum": [
                  "enabled",
                  "disabled",
                  "auto"
                ],
                "example": "enabled"
              }
            },
            "required": [
              "type"
            ]
          },
          "stream": {
            "type": "boolean",
            "description": "응답 내용의 스트리밍 반환 여부\n\n- `false`: 모델이 모든 내용을 생성한 후 한 번에 결과 반환\n- `true`: SSE 프로토콜에 따라 모델 생성 내용을 청크 단위로 반환하며, `data: [DONE]` 메시지로 종료. stream이 true일 때 stream_options 필드를 설정하여 토큰 사용량 통계를 받을 수 있습니다",
            "default": false,
            "example": false
          },
          "stream_options": {
            "type": "object",
            "nullable": true,
            "description": "스트리밍 응답 옵션. stream이 true일 때 이 필드를 설정할 수 있습니다",
            "properties": {
              "include_usage": {
                "type": "boolean",
                "nullable": true,
                "description": "모델 스트리밍 출력 시, 출력 종료 전에 이번 요청의 토큰 사용량 정보를 출력할지 여부\n\n- `true`: `data: [DONE]` 메시지 전에 추가 chunk를 반환하며, usage 필드에 전체 요청의 토큰 사용량을 출력하고 choices 필드는 빈 배열\n- `false`: 출력 종료 전에 토큰 사용량 정보를 반환하는 chunk 없음",
                "default": false,
                "example": true
              },
              "chunk_include_usage": {
                "type": "boolean",
                "nullable": true,
                "description": "모델 스트리밍 출력 시, 각 chunk에 해당 시점까지의 누적 토큰 사용량 정보를 출력할지 여부\n\n- `true`: 반환되는 usage 필드에 해당 chunk 출력 시점까지의 누적 토큰 사용량 출력\n- `false`: 각 chunk에 토큰 사용량 정보를 반환하지 않음",
                "default": false
              }
            }
          },
          "max_tokens": {
            "type": "integer",
            "nullable": true,
            "description": "모델 응답 최대 길이 (토큰 단위)\n\n**참고**:\n- 모델 응답에는 사고 체인 내용이 포함되지 않습니다 (모델 응답 = 모델 출력 - 모델 사고 체인)\n- 출력 토큰의 총 길이는 모델의 컨텍스트 길이 제한을 받습니다\n- max_completion_tokens와 동시에 설정할 수 없습니다",
            "default": 4096,
            "example": 4096
          },
          "max_completion_tokens": {
            "type": "integer",
            "nullable": true,
            "description": "모델 출력의 최대 길이 제어, 모델 응답과 사고 체인 내용 길이 포함 (토큰 단위)\n\n**설명**:\n- 값 범위: [0, 65536]\n- 설정 시 max_tokens 기본값이 무효화되며, 모델이 필요에 따라 내용 (응답 및 사고 체인)을 출력하다가 이 값에 도달하면 중단\n- max_tokens와 동시에 설정할 수 없습니다\n- 심층 사고 모드 활성화 시 이 매개변수 사용을 권장합니다",
            "minimum": 0,
            "maximum": 65536,
            "example": 16384
          },
          "temperature": {
            "type": "number",
            "nullable": true,
            "description": "샘플링 온도, 출력의 무작위성 제어\n\n**설명**:\n- 값 범위: [0, 2]\n- 낮은 값 (예: 0.2): 더 확정적이고 집중된 출력\n- 높은 값 (예: 0.8): 더 무작위적이고 창의적인 출력\n- 값이 0이면 모델은 로그 확률이 가장 높은 하나의 토큰만 고려\n- temperature 또는 top_p 중 하나만 조정하는 것을 권장합니다",
            "minimum": 0,
            "maximum": 2,
            "default": 1,
            "example": 0.7
          },
          "top_p": {
            "type": "number",
            "nullable": true,
            "description": "핵 샘플링 확률 임계값\n\n**설명**:\n- 값 범위: [0, 1]\n- 모델은 확률 질량이 top_p 이내인 토큰 결과를 고려\n- 0.1은 확률 질량 상위 10%의 토큰만 고려함을 의미\n- 값이 클수록 생성의 무작위성이 높아지고, 값이 작을수록 확정성이 높아짐\n- temperature 또는 top_p 중 하나만 조정하는 것을 권장합니다",
            "minimum": 0,
            "maximum": 1,
            "default": 0.7,
            "example": 0.9
          },
          "stop": {
            "description": "모델이 stop 필드에 지정된 문자열을 만나면 생성을 중단하며, 해당 단어 자체는 출력되지 않습니다. 최대 4개의 문자열 지원\n\n**참고**: 심층 사고 모델은 이 필드를 지원하지 않습니다",
            "nullable": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "maxItems": 4
              }
            ],
            "example": [
              "hello",
              "weather"
            ]
          },
          "reasoning_effort": {
            "type": "string",
            "nullable": true,
            "description": "사고의 작업량을 제한하여, 사고 깊이를 줄이면 속도가 향상되고 사고에 소비되는 토큰이 줄어듭니다\n\n- `minimal`: 사고 비활성화, 직접 답변\n- `low`: 경량 사고, 빠른 응답 중심\n- `medium`: 균형 모드, 속도와 깊이 모두 고려\n- `high`: 심층 분석, 복잡한 문제 처리",
            "enum": [
              "minimal",
              "low",
              "medium",
              "high"
            ],
            "default": "medium",
            "example": "medium"
          },
          "response_format": {
            "type": "object",
            "description": "모델 응답 형식 지정\n\n세 가지 형식 지원: text (기본값), json_object, json_schema",
            "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",
                "example": "text"
              },
              "json_schema": {
                "type": "object",
                "description": "JSON 구조체 정의 (type이 json_schema일 때 필수)",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "사용자 정의 JSON 구조 이름"
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "응답 용도 설명, 모델이 이 설명에 따라 해당 형식으로 응답하는 방법을 결정"
                  },
                  "schema": {
                    "type": "object",
                    "description": "응답 형식의 JSON 형식 정의, JSON Schema 객체 형태로 기술"
                  },
                  "strict": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "엄격 준수 모드 활성화 여부\n\n- `true`: 모델이 항상 schema 필드에 정의된 형식을 엄격히 준수\n- `false`: 모델이 가능한 한 schema 필드에 정의된 구조를 따름",
                    "default": false
                  }
                },
                "required": [
                  "name",
                  "schema"
                ]
              }
            },
            "required": [
              "type"
            ]
          },
          "frequency_penalty": {
            "type": "number",
            "nullable": true,
            "description": "빈도 페널티 계수\n\n**설명**:\n- 값 범위: [-2.0, 2.0]\n- 양수일 때, 텍스트에서 새 토큰의 출현 빈도에 따라 페널티를 부여하여 모델이 동일한 내용을 반복할 가능성을 줄임",
            "minimum": -2,
            "maximum": 2,
            "default": 0,
            "example": 0
          },
          "presence_penalty": {
            "type": "number",
            "nullable": true,
            "description": "존재 페널티 계수\n\n**설명**:\n- 값 범위: [-2.0, 2.0]\n- 양수일 때, 새 토큰이 현재까지 텍스트에 나타났는지 여부에 따라 페널티를 부여하여 모델이 새로운 주제를 다룰 가능성을 높임",
            "minimum": -2,
            "maximum": 2,
            "default": 0,
            "example": 0
          },
          "logprobs": {
            "type": "boolean",
            "nullable": true,
            "description": "출력 토큰의 로그 확률 반환 여부\n\n- `false`: 로그 확률 정보를 반환하지 않음\n- `true`: 메시지 내용의 각 출력 토큰에 대한 로그 확률 반환\n\n**참고**: 심층 사고 모델은 이 필드를 지원하지 않습니다",
            "default": false
          },
          "top_logprobs": {
            "type": "integer",
            "nullable": true,
            "description": "각 출력 토큰 위치에서 반환할 가능성이 가장 높은 토큰 수 지정, 각 토큰에는 관련 로그 확률이 포함\n\n- 값 범위: [0, 20]\n- logprobs가 true일 때만 설정 가능\n\n**참고**: 심층 사고 모델은 이 필드를 지원하지 않습니다",
            "minimum": 0,
            "maximum": 20,
            "default": 0
          },
          "logit_bias": {
            "type": "object",
            "nullable": true,
            "description": "지정된 토큰이 모델 출력 내용에 나타날 확률 조정\n\n**설명**:\n- map을 받으며, 키는 어휘의 토큰 ID, 값은 편향값\n- 편향값 범위: [-100, 100]\n- -1은 선택 가능성을 줄이고, 1은 선택 가능성을 높임\n- -100은 해당 토큰 선택을 완전히 금지하고, 100은 해당 토큰만 선택 가능하게 함\n\n**참고**: 심층 사고 모델은 이 필드를 지원하지 않습니다",
            "additionalProperties": {
              "type": "integer",
              "minimum": -100,
              "maximum": 100
            }
          },
          "tools": {
            "type": "array",
            "nullable": true,
            "description": "호출할 도구 목록, 모델 반환 정보에 도구 호출 요청이 포함될 수 있습니다",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          },
          "parallel_tool_calls": {
            "type": "boolean",
            "description": "이번 요청에서 모델 반환에 여러 호출 대기 도구를 포함할 수 있는지 여부\n\n- `true`: 여러 호출 대기 도구 반환 허용\n- `false`: 반환되는 호출 대기 도구 수 <= 1",
            "default": true
          },
          "tool_choice": {
            "description": "이번 요청에서 모델 반환 정보에 호출 대기 도구가 있는지 여부\n\n**문자열 모드**:\n- `none`: 모델 반환 정보에 호출 대기 도구를 포함하지 않음\n- `required`: 모델 반환 정보에 반드시 호출 대기 도구를 포함\n- `auto`: 모델이 반환 정보에 호출 대기 도구 포함 여부를 자체 판단 (도구 존재 시 기본값)\n\n**객체 모드**: 호출할 도구의 범위 지정",
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "auto",
                  "required"
                ]
              },
              {
                "$ref": "#/components/schemas/ToolChoiceObject"
              }
            ]
          }
        }
      },
      "Message": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "role": {
            "type": "string",
            "description": "메시지 역할\n\n- `user`: 사용자 메시지\n- `assistant`: AI 어시스턴트 메시지 (다중 턴 대화용)\n- `system`: 시스템 프롬프트 (AI의 역할 및 동작 설정)\n- `tool`: 도구가 반환한 메시지 (도구 호출 시나리오)",
            "enum": [
              "user",
              "assistant",
              "system",
              "tool"
            ],
            "example": "user"
          },
          "content": {
            "type": "array",
            "description": "메시지 내용. 두 가지 형식 지원:\n\n**1. 텍스트 문자열**: 문자열을 직접 전달 가능, 예: `\"content\": \"자기소개를 해주세요\"`\n\n**2. 객체 배열** (텍스트, 이미지, 비디오 등 멀티모달 입력 지원): 아래 예시 구조 참조",
            "items": {
              "$ref": "#/components/schemas/ContentPart"
            }
          },
          "reasoning_content": {
            "type": "string",
            "description": "모델 메시지의 사고 체인 내용 (assistant 역할만 해당)\n\n다중 턴 대화에서 이전 사고 체인 내용을 전달할 때만 사용"
          },
          "tool_calls": {
            "type": "array",
            "description": "모델 메시지의 도구 호출 부분 (assistant 역할만 해당)",
            "items": {
              "$ref": "#/components/schemas/ToolCall"
            }
          },
          "tool_call_id": {
            "type": "string",
            "description": "모델이 생성한 도구 호출 요청 ID (tool 역할에만 이 필드 필요)\n\n도구 반환 결과와 모델 요청을 연결하여, 다중 도구 호출 시 정보 혼동을 방지"
          }
        }
      },
      "ContentPart": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TextContent"
          },
          {
            "$ref": "#/components/schemas/ImageContent"
          },
          {
            "$ref": "#/components/schemas/VideoContent"
          }
        ]
      },
      "TextContent": {
        "title": "텍스트 내용",
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text"
            ],
            "description": "내용 유형"
          },
          "text": {
            "type": "string",
            "description": "텍스트 내용",
            "example": "이 이미지를 자세히 설명해 주세요"
          }
        }
      },
      "ImageContent": {
        "title": "이미지 내용",
        "type": "object",
        "required": [
          "type",
          "image_url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "image_url"
            ],
            "description": "내용 유형"
          },
          "image_url": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "이미지 URL 주소 또는 Base64 인코딩\n\n**지원 형식**:\n- 이미지 링크 (공개 접근 가능)\n- 이미지의 Base64 인코딩",
                "example": "https://example.com/image.png"
              },
              "detail": {
                "type": "string",
                "nullable": true,
                "description": "이미지 이해 정밀도\n\n- `low`: 낮은 정밀도\n- `high`: 높은 정밀도\n- `xhigh`: 초고 정밀도",
                "enum": [
                  "low",
                  "high",
                  "xhigh"
                ]
              }
            }
          }
        }
      },
      "VideoContent": {
        "title": "비디오 내용",
        "type": "object",
        "required": [
          "type",
          "video_url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "video_url"
            ],
            "description": "내용 유형"
          },
          "video_url": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri",
                "description": "비디오 URL 주소 또는 Base64 인코딩\n\n**지원 형식**:\n- 비디오 링크 (공개 접근 가능)\n- 비디오의 Base64 인코딩\n\n**참고**: 비디오의 오디오 내용 이해는 지원하지 않습니다",
                "example": "https://example.com/video.mp4"
              },
              "fps": {
                "type": "number",
                "nullable": true,
                "description": "프레임 추출 빈도\n\n- 값 범위: [0.2, 5]\n- 값이 높을수록 비디오의 화면 변화에 더 민감\n- 값이 낮을수록 비디오의 화면 변화에 덜 민감하지만, 토큰 소비가 적고 속도가 빠름",
                "minimum": 0.2,
                "maximum": 5,
                "default": 1,
                "example": 1
              }
            }
          }
        }
      },
      "Tool": {
        "type": "object",
        "required": [
          "type",
          "function"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "도구 유형, 현재 function만 지원",
            "enum": [
              "function"
            ]
          },
          "function": {
            "type": "object",
            "required": [
              "name"
            ],
            "description": "함수 정의",
            "properties": {
              "name": {
                "type": "string",
                "description": "호출할 함수 이름"
              },
              "description": {
                "type": "string",
                "description": "함수 설명, 모델이 이 도구를 호출할지 여부를 판단하는 데 사용"
              },
              "parameters": {
                "type": "object",
                "description": "함수 요청 매개변수, JSON Schema 형식으로 기술\n\n**참고**:\n- 모든 필드명은 대소문자를 구분합니다\n- parameters는 유효한 JSON Schema 객체여야 합니다\n- 영문 필드명 사용을 권장하며, 한국어는 description 필드에 작성"
              }
            }
          }
        }
      },
      "ToolChoiceObject": {
        "type": "object",
        "required": [
          "type",
          "function"
        ],
        "description": "호출할 도구의 범위 지정",
        "properties": {
          "type": {
            "type": "string",
            "description": "호출 유형",
            "enum": [
              "function"
            ]
          },
          "function": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "호출할 도구의 이름"
              }
            }
          }
        }
      },
      "ToolCall": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "호출된 도구의 ID, 모델이 생성"
          },
          "type": {
            "type": "string",
            "description": "도구 유형, 현재 function만 지원",
            "enum": [
              "function"
            ]
          },
          "function": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "호출할 함수 이름"
              },
              "arguments": {
                "type": "string",
                "description": "호출할 함수의 입력 매개변수, JSON 형식\n\n**참고**: 모델이 항상 유효한 JSON을 생성하는 것은 아니며, 정의되지 않은 매개변수를 만들어낼 수 있습니다. 함수 호출 전에 매개변수의 유효성을 검증하는 것을 권장합니다"
              }
            }
          }
        }
      },
      "ChatCompletionResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "이번 요청의 고유 식별자",
            "example": "0217714854126607f5a9cf8ed5b018c76e4ad3dc2810db57ffb50"
          },
          "model": {
            "type": "string",
            "description": "이번 요청에서 실제 사용된 모델 이름 및 버전",
            "example": "doubao-seed-2-0-pro-260215"
          },
          "object": {
            "type": "string",
            "enum": [
              "chat.completion"
            ],
            "description": "응답 유형, chat.completion으로 고정",
            "example": "chat.completion"
          },
          "service_tier": {
            "type": "string",
            "description": "이번 요청의 서비스 등급\n\n- `default`: 기본 서비스 등급\n- `scale`: 보장 패키지 할당량 사용",
            "enum": [
              "default",
              "scale"
            ],
            "example": "default"
          },
          "created": {
            "type": "integer",
            "description": "이번 요청 생성 시간의 Unix 타임스탬프 (초)",
            "example": 1771485416
          },
          "choices": {
            "type": "array",
            "description": "이번 요청의 모델 출력 내용",
            "items": {
              "$ref": "#/components/schemas/Choice"
            }
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        }
      },
      "Choice": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "choices 목록에서 현재 요소의 인덱스",
            "example": 0
          },
          "message": {
            "$ref": "#/components/schemas/AssistantMessage"
          },
          "finish_reason": {
            "type": "string",
            "description": "모델이 토큰 생성을 중단한 이유\n\n- `stop`: 모델 출력이 자연스럽게 종료되었거나, stop 매개변수에 지정된 필드에 의해 잘림\n- `length`: 모델 출력이 max_tokens / max_completion_tokens / 컨텍스트 길이 제한에 도달하여 잘림\n- `content_filter`: 모델 출력이 콘텐츠 검토에 의해 차단됨\n- `tool_calls`: 모델이 도구를 호출함",
            "enum": [
              "stop",
              "length",
              "content_filter",
              "tool_calls"
            ],
            "example": "stop"
          },
          "logprobs": {
            "type": "object",
            "nullable": true,
            "description": "현재 내용의 로그 확률 정보",
            "properties": {
              "content": {
                "type": "array",
                "nullable": true,
                "description": "각 content 요소의 토큰 로그 확률 정보",
                "items": {
                  "$ref": "#/components/schemas/LogprobContent"
                }
              }
            }
          },
          "moderation_hit_type": {
            "type": "string",
            "nullable": true,
            "description": "모델 출력 텍스트에 민감한 정보가 포함된 경우, 해당하는 위험 분류 라벨을 반환합니다\n\n- `severe_violation`: 모델 출력 텍스트가 심각한 위반에 해당\n- `violence`: 모델 출력 텍스트가 폭력적 행위에 해당",
            "enum": [
              "severe_violation",
              "violence"
            ]
          }
        }
      },
      "AssistantMessage": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "description": "내용 출력 역할, assistant로 고정",
            "enum": [
              "assistant"
            ],
            "example": "assistant"
          },
          "content": {
            "type": "string",
            "description": "모델이 생성한 메시지 내용",
            "example": "안녕하세요! Doubao Seed 2.0은 바이트댄스가 출시한 차세대 대규모 언어 모델로, 더 강력한 추론, 멀티모달 이해 및 심층 사고 능력을 갖추고 있습니다."
          },
          "reasoning_content": {
            "type": "string",
            "nullable": true,
            "description": "모델의 문제 처리 사고 체인 내용\n\n심층 사고 모드 활성화 시에만 반환"
          },
          "tool_calls": {
            "type": "array",
            "nullable": true,
            "description": "모델이 생성한 도구 호출",
            "items": {
              "$ref": "#/components/schemas/ToolCall"
            }
          }
        }
      },
      "LogprobContent": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "현재 토큰"
          },
          "bytes": {
            "type": "array",
            "nullable": true,
            "description": "현재 토큰의 UTF-8 값, 정수 목록 형식",
            "items": {
              "type": "integer"
            }
          },
          "logprob": {
            "type": "number",
            "description": "현재 토큰의 로그 확률"
          },
          "top_logprobs": {
            "type": "array",
            "description": "현재 토큰 위치에서 가장 가능성이 높은 토큰 및 로그 확률 목록",
            "items": {
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "description": "현재 토큰"
                },
                "bytes": {
                  "type": "array",
                  "nullable": true,
                  "description": "현재 토큰의 UTF-8 값",
                  "items": {
                    "type": "integer"
                  }
                },
                "logprob": {
                  "type": "number",
                  "description": "현재 토큰의 로그 확률"
                }
              }
            }
          }
        }
      },
      "Usage": {
        "type": "object",
        "description": "이번 요청의 토큰 사용량",
        "properties": {
          "total_tokens": {
            "type": "integer",
            "description": "이번 요청에서 소비된 총 토큰 수 (입력 + 출력)",
            "example": 271
          },
          "prompt_tokens": {
            "type": "integer",
            "description": "모델에 입력된 내용의 토큰 수",
            "example": 15
          },
          "prompt_tokens_details": {
            "type": "object",
            "description": "입력 토큰 수 상세 정보",
            "properties": {
              "cached_tokens": {
                "type": "integer",
                "description": "캐시된 입력 내용의 토큰 사용량",
                "example": 0
              }
            }
          },
          "completion_tokens": {
            "type": "integer",
            "description": "모델 출력 내용에 소비된 토큰",
            "example": 256
          },
          "completion_tokens_details": {
            "type": "object",
            "description": "출력 토큰 소비 상세 정보",
            "properties": {
              "reasoning_tokens": {
                "type": "integer",
                "description": "사고 체인 내용 출력에 소비된 토큰 수",
                "example": 0
              }
            }
          }
        }
      },
      "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": "채팅 생성",
      "description": "AI 채팅 생성 관련 API"
    }
  ]
}
