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

> ## Agent Instructions
> For AgentScope Python, use https://docs.agentscope.io/stable/en/index for new projects. For existing projects, check the installed agentscope version and use matching versioned documentation.
> The /latest/ alias points to the newest documentation and may move ahead of /stable/ when a development version exists. Do not mix AgentScope 1.x and 2.x APIs.
> State the AgentScope version when providing installation commands or code examples. ReMe uses its own continuously updated /reme/latest/ documentation.

# Upload OpenAI consent recording

> Upload a consent recording to OpenAI to obtain a consent ID.

The consent recording must contain the voice actor reading
a specific consent phrase (see OpenAI docs).

Args:
    body: Consent request with audio and language.
    user_id: Injected authenticated user ID.
    access: Injected access service.

Returns:
    OpenAIConsentResponse with the consent_id.



## OpenAPI

````yaml /en/versions/2.0.12/deploy/openapi.json post /voice-profile/openai-consent
openapi: 3.1.0
info:
  title: AgentScope
  version: 2.0.12
servers: []
security: []
paths:
  /voice-profile/openai-consent:
    post:
      tags:
        - voice_profile
      summary: Upload OpenAI consent recording
      description: |-
        Upload a consent recording to OpenAI to obtain a consent ID.

        The consent recording must contain the voice actor reading
        a specific consent phrase (see OpenAI docs).

        Args:
            body: Consent request with audio and language.
            user_id: Injected authenticated user ID.
            access: Injected access service.

        Returns:
            OpenAIConsentResponse with the consent_id.
      operationId: upload_openai_consent_voice_profile_openai_consent_post
      parameters:
        - name: x-user-id
          in: header
          required: true
          schema:
            type: string
            description: >-
              Caller's user ID. Temporary header-based identity; will be
              replaced by JWT auth.
            title: X-User-Id
          description: >-
            Caller's user ID. Temporary header-based identity; will be replaced
            by JWT auth.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenAIConsentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIConsentResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    OpenAIConsentRequest:
      properties:
        credential_id:
          type: string
          title: Credential Id
        name:
          type: string
          title: Name
          default: agentscope_consent
        language:
          type: string
          title: Language
          default: en-US
        audio_base64:
          type: string
          maxLength: 13981016
          title: Audio Base64
        audio_filename:
          type: string
          title: Audio Filename
          default: consent.wav
      type: object
      required:
        - credential_id
        - audio_base64
      title: OpenAIConsentRequest
      description: Request body for uploading an OpenAI consent recording.
    OpenAIConsentResponse:
      properties:
        consent_id:
          type: string
          title: Consent Id
      type: object
      required:
        - consent_id
      title: OpenAIConsentResponse
      description: Response body for OpenAI consent upload.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.