{
  "openapi": "3.1.0",
  "info": {
    "title": "Doubao Seed 2.0 Responses API 빠른 시작",
    "description": "Doubao Seed 2.0 Responses API 빠른 시작, 5분 만에 첫 번째 호출 완료",
    "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- 최소한의 매개변수로 빠르게 시작\n- 지원 모델: `doubao-seed-2.0-pro`, `doubao-seed-2.0-lite`, `doubao-seed-2.0-mini`, `doubao-seed-2.0-code`\n- 더 많은 기능이 필요하신가요? [전체 API 레퍼런스](./doubao-seed-2.0-responses-reference)를 확인하세요",
        "operationId": "createResponseQuickDoubaoSeed20",
        "tags": [
          "Responses API"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResponseQuickRequest"
              }
            }
          }
        },
        "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/billing"
                  }
                }
              }
            }
          },
          "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"
                  }
                }
              }
            }
          },
          "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": {
      "ResponseQuickRequest": {
        "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": {
            "type": "string",
            "description": "입력 내용 (텍스트), user 역할로 입력한 텍스트 정보와 동일",
            "example": "안녕하세요, Doubao Seed 2.0의 새로운 기능을 소개해 주세요"
          }
        }
      },
      "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": "이번 요청의 서비스 등급",
            "example": "default"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "max_output_tokens": {
            "type": "integer",
            "description": "모델 출력 최대 토큰 수",
            "example": 32768
          },
          "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"
          }
        ]
      },
      "ReasoningOutput": {
        "title": "사고 체인 출력",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "출력 항목 ID",
            "example": "rs_0217****404a"
          },
          "type": {
            "type": "string",
            "description": "출력 유형, 여기서는 reasoning",
            "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",
            "description": "출력 유형, 여기서는 message",
            "enum": [
              "message"
            ]
          },
          "role": {
            "type": "string",
            "description": "역할, assistant로 고정",
            "enum": [
              "assistant"
            ]
          },
          "content": {
            "type": "array",
            "description": "메시지 내용 목록",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "텍스트 내용",
                  "example": "안녕하세요! 만나서 반갑습니다~ 무엇을 도와드릴까요?"
                },
                "type": {
                  "type": "string",
                  "description": "내용 유형",
                  "enum": [
                    "output_text"
                  ]
                },
                "annotations": {
                  "type": "array",
                  "nullable": true,
                  "description": "주석 정보"
                }
              }
            }
          },
          "status": {
            "type": "string",
            "description": "상태",
            "enum": [
              "in_progress",
              "completed",
              "incomplete"
            ],
            "example": "completed"
          }
        }
      },
      "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 채팅 생성 인터페이스"
    }
  ]
}
