> ## Documentation Index
> Fetch the complete documentation index at: https://docs.evolink.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Doubao Seed 2.0 - Inicio rápido

> - 使用 OpenAI SDK 格式调用 Doubao Seed 2.0 系列模型
- 同步处理模式，实时返回对话内容
- 最简化参数，快速上手
- 支持模型：`doubao-seed-2.0-pro`、`doubao-seed-2.0-lite`、`doubao-seed-2.0-mini`、`doubao-seed-2.0-code`
- 💡 需要更多功能？查看 [完整参数文档](./doubao-seed-2.0-reference)

<Note>
  **BaseURL**: La BaseURL predeterminada es `https://direct.evolink.ai`, que ofrece mejor compatibilidad con modelos de texto y admite conexiones persistentes. `https://api.evolink.ai` es el endpoint principal para servicios multimodales y actúa como dirección de respaldo para los modelos de texto.
</Note>


## OpenAPI

````yaml es/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-quickstart.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Inicio rápido de Doubao Seed 2.0
  description: >-
    Comienza rápidamente con la interfaz de chat de Doubao Seed 2.0, completa tu
    primera llamada de chat IA en 5 minutos
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: Producción (recomendado)
  - url: https://api.evolink.ai
    description: URL alternativa
security:
  - bearerAuth: []
tags:
  - name: Generación de chat
    description: APIs relacionadas con generación de chat IA
paths:
  /v1/chat/completions:
    post:
      tags:
        - Generación de chat
      summary: Chat rápido de Doubao Seed 2.0
      description: >-
        - 使用 OpenAI SDK 格式调用 Doubao Seed 2.0 系列模型

        - 同步处理模式，实时返回对话内容

        - 最简化参数，快速上手

        -
        支持模型：`doubao-seed-2.0-pro`、`doubao-seed-2.0-lite`、`doubao-seed-2.0-mini`、`doubao-seed-2.0-code`

        - 💡 需要更多功能？查看 [完整参数文档](./doubao-seed-2.0-reference)
      operationId: createChatCompletionQuickDoubaoSeed20
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionQuickRequest'
      responses:
        '200':
          description: Chat generado con éxito
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '400':
          description: Error en los parámetros de la solicitud
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: No autenticado, token inválido o expirado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Cuota insuficiente, necesita recargar
          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: Acceso denegado
          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: Recurso no encontrado
          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: Límite de frecuencia de solicitudes excedido
          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: Error interno del servidor
          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: Error del servicio upstream
          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: Servicio temporalmente no disponible
          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:
    ChatCompletionQuickRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          description: |-
            对话模型名称

            - `doubao-seed-2.0-pro`: 旗舰版，综合能力最强，适合复杂推理和高质量生成
            - `doubao-seed-2.0-lite`: 轻量版，速度更快，性价比高
            - `doubao-seed-2.0-mini`: 极速版，响应最快，适合简单任务
            - `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/MessageSimple'
          minItems: 1
          example:
            - role: user
              content: 你好，介绍一下 Doubao Seed 2.0 的新特性
    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: 响应类型
          example: chat.completion
        created:
          type: integer
          description: 创建时间戳
          example: 1771485416
        service_tier:
          type: string
          description: |-
            本次请求的服务等级

            - `default`: 默认服务等级
            - `scale`: 使用了保障包额度
          enum:
            - default
            - scale
          example: default
        choices:
          type: array
          description: Generación de chat的选择列表
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    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: 错误时的建议
    MessageSimple:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: 消息角色
          enum:
            - user
        content:
          type: string
          description: 消息内容（纯文本）
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: 选择的索引
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          description: 完成原因
          enum:
            - stop
            - length
            - content_filter
          example: stop
        moderation_hit_type:
          type: string
          nullable: true
          description: |-
            模型输出文字含有敏感信息时，返回命中的风险分类标签

            - `severe_violation`: 模型输出文字涉及严重违规
            - `violence`: 模型输出文字涉及激进行为
          enum:
            - severe_violation
            - violence
    Usage:
      type: object
      description: Token 使用统计信息
      properties:
        prompt_tokens:
          type: integer
          description: 输入内容的 token 数量
          example: 15
        completion_tokens:
          type: integer
          description: 输出内容的 token 数量
          example: 256
        total_tokens:
          type: integer
          description: 总 token 数量
          example: 271
        prompt_tokens_details:
          type: object
          description: 输入 token 详细信息
          properties:
            cached_tokens:
              type: integer
              description: 击中缓存的 token 数量
              example: 0
        completion_tokens_details:
          type: object
          description: 输出 token 详细信息
          properties:
            reasoning_tokens:
              type: integer
              description: 推理/思维链 token 数量
              example: 0
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          description: 消息发送者的角色
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: AI 回复的消息内容
          example: 你好！Doubao Seed 2.0 是字节跳动推出的新一代大语言模型，具有更强的推理、多模态理解和深度思考能力...
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````