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

# 创建服务 API key

> 为 Enterprise 中的组织创建服务 API key

需要 Enterprise 管理员的个人 API key。

为 Enterprise 中指定的组织创建服务 API key。


## OpenAPI

````yaml zh/v2-openapi.yaml POST /v2/enterprise/api-keys
openapi: 3.1.0
info:
  description: 供企业管理员使用的 Devin v2 API（个人 API key）
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/api-keys:
    post:
      tags:
        - api-keys
      summary: 签发服务 API key 的端点
      description: 在企业版中为组织配置服务 API key。
      operationId: provision_service_api_key_endpoint_v2_enterprise_api_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceKeyRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceKeyResponse'
          description: 成功的响应
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: 验证错误
components:
  schemas:
    ServiceKeyRequest:
      properties:
        org_id:
          title: Org Id
          type: string
      required:
        - org_id
      title: ServiceKeyRequest
      type: object
    ServiceKeyResponse:
      properties:
        api_key:
          title: Api Key
          type: string
        org_id:
          title: Org Id
          type: string
      required:
        - api_key
        - org_id
      title: ServiceKeyResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 仅供 Enterprise 管理员使用的个人 API Key（apk_user_*）
      scheme: bearer
      type: http

````