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

# 创建账号

> 接口说明：仅支持插件授权平台创建账号



## OpenAPI

````yaml /openapi/zh/aitoearn.openapi.json post /api/v2/channels/accounts
openapi: 3.0.1
info:
  title: AiToEarn 开放平台 API
  description: AiToEarn 开放平台 API，支持在中国站与国际站之间切换调试。业务是否成功以响应体 code === 0 为准。
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: 中国站
  - url: https://aitoearn.ai
    description: 国际站
security: []
tags:
  - name: AI 服务
  - name: AI 服务/视频生成
  - name: AI 服务/图像生成
  - name: AI 服务/模型中转
  - name: 渠道管理
  - name: 渠道管理/账号
  - name: 渠道管理/内容发布
  - name: 渠道管理/平台
  - name: 渠道管理/互动
  - name: 渠道管理/作品
  - name: 渠道管理/账号分组
  - name: 渠道管理/授权
  - name: 资源管理
paths:
  /api/v2/channels/accounts:
    post:
      tags:
        - 渠道管理/账号
      summary: 创建账号
      description: 接口说明：仅支持插件授权平台创建账号
      operationId: AccountsController_create_v2
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - douyin
                    - xhs
                    - wxSph
                    - KWAI
                    - youtube
                    - wxGzh
                    - bilibili
                    - twitter
                    - tiktok
                    - facebook
                    - instagram
                    - threads
                    - pinterest
                    - linkedin
                    - google_business
                  description: 平台类型
                uid:
                  description: 平台账号 UID，不传时由平台登录凭据获取
                  type: string
                  minLength: 1
                nickname:
                  description: 昵称，不传时由平台登录凭据获取
                  type: string
                  minLength: 1
                avatar:
                  description: 头像 URL
                  type: string
                groupId:
                  type: string
                  description: 账号分组 ID
                loginCookie:
                  description: 平台登录 Cookie
                  type: string
                  minLength: 1
              required:
                - type
            examples: {}
        required: true
      responses:
        '200':
          description: 请求已被服务处理。业务是否成功以响应体 code === 0 为准。
          content:
            application/json:
              schema:
                type: object
                properties:
                  data: {}
                  code:
                    type: integer
                    description: 业务状态码。0 表示成功，非 0 表示业务错误。
                  message:
                    type: string
                    description: 响应消息。
                  requestId:
                    type: string
                    description: 请求 ID。
                  timestamp:
                    type: integer
                    description: 错误响应时间戳，Unix 毫秒。
                required:
                  - code
                  - message
              examples:
                success:
                  summary: 成功
                  value:
                    code: 0
                    message: 请求成功
                    data: string
                validationFailed10002:
                  summary: ValidationFailed (10002)
                  value:
                    code: 10002
                    message: 参数验证失败
                    data: {}
                    timestamp: 1772099056662
                unauthorized401:
                  summary: 未认证或 API Key 无效
                  value:
                    code: 401
                    message: Unauthorized
                    data: {}
                    timestamp: 1772099056662
                accountCreateFailed12604:
                  summary: AccountCreateFailed (12604)
                  value:
                    code: 12604
                    message: 账号创建失败
                    data: {}
                    timestamp: 1772099056662
                accountGroupNotFound12601:
                  summary: AccountGroupNotFound (12601)
                  value:
                    code: 12601
                    message: 账号分组未找到
                    data: {}
                    timestamp: 1772099056662
                channelAccountAlreadyConnectedToAnotherUser15082:
                  summary: ChannelAccountAlreadyConnectedToAnotherUser (15082)
                  value:
                    code: 15082
                    message: 该渠道账号已绑定到其他用户
                    data: {}
                    timestamp: 1772099056662
                channelAccountCreateNotSupported15081:
                  summary: ChannelAccountCreateNotSupported (15081)
                  value:
                    code: 15081
                    message: 该平台暂不支持通过此接口创建账号
                    data: {}
                    timestamp: 1772099056662
                channelAccountCreateRequiredFieldMissing15092:
                  summary: ChannelAccountCreateRequiredFieldMissing (15092)
                  value:
                    code: 15092
                    message: 缺少渠道账号创建必填字段
                    data: {}
                    timestamp: 1772099056662
                channelPlatformResponseInvalid15072:
                  summary: ChannelPlatformResponseInvalid (15072)
                  value:
                    code: 15072
                    message: '{{platform}} 平台接口返回数据无效'
                    data: {}
                    timestamp: 1772099056662
      deprecated: false
      security:
        - apikey-header-X-Api-Key: []
components:
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: AiToEarn Open Platform API Key。

````