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

# Create a real-person verification session

> Create a single-use H5 verification session; save the token and complete the flow within 120 seconds.



## OpenAPI

````yaml openapi/byteplus-assets.yaml POST /assets/real-human/verification-sessions
openapi: 3.1.0
info:
  title: BytePlus Assets API
  version: 1.0.0
  description: >-
    GENGEN reference for BytePlus asset groups, reusable assets, the public
    asset library, and real-person verification.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /assets/real-human/verification-sessions:
    post:
      summary: Create a real-person verification session
      description: >
        Create a short-lived H5 verification session for a real-person portrait
        group.

        Save BytedToken, direct the user to H5Link, and retrieve the result
        after the callback reports resultCode 10000.

        BytedToken and H5Link expire after 120 seconds and support one
        verification attempt.
      operationId: createRealHumanVerificationSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVerificationSessionRequest'
            example:
              name: Jane Doe verification
              description: Real-person portrait group
              callback_url: https://www.example.com/callback
      responses:
        '200':
          description: A short-lived H5 verification session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerificationSessionResponse'
              example:
                BytedToken: 202603311449168C23BA26**************
                H5Link: >-
                  https://h5-v2.kych5.com/verify?bytedToken=202603311449168C23BA26**************&lng=en
                CallbackURL: https://www.example.com/callback
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '502':
          $ref: '#/components/responses/ProviderError'
        default:
          $ref: '#/components/responses/ProviderError'
      x-codeSamples:
        - lang: bash
          label: Create session
          source: |
            curl --request POST \
              --url https://gengen.farm/api/gengen/v1/assets/real-human/verification-sessions \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
              --header 'Content-Type: application/json' \
              --data '{
                "name": "Jane Doe verification",
                "description": "Real-person portrait group",
                "callback_url": "https://www.example.com/callback"
              }'
components:
  schemas:
    CreateVerificationSessionRequest:
      type: object
      required:
        - name
        - callback_url
      properties:
        name:
          type: string
          minLength: 1
          description: GENGEN-local asset group name.
        description:
          type: string
          maxLength: 300
          description: GENGEN-local asset group description.
        callback_url:
          type: string
          format: uri
          description: Public URL opened after verification finishes.
      additionalProperties: false
    VerificationSessionResponse:
      type: object
      required:
        - BytedToken
        - H5Link
        - CallbackURL
      properties:
        BytedToken:
          type: string
          description: Short-lived token used to retrieve the created asset group.
        H5Link:
          type: string
          format: uri
          description: >-
            Single-use H5 verification link. Append lng with zh, en, or zh-Hant
            to select the interface language.
        CallbackURL:
          type: string
          format: uri
          description: >-
            Destination URL opened after verification. A resultCode of 10000
            indicates success; other callback fields include bytedToken,
            algorithmBaseRespCode, reqMeasureInfoValue, and verify_type.
      additionalProperties: false
    Error:
      type: object
      properties:
        error_code:
          type: string
        error:
          type: string
        error_params:
          type: object
          additionalProperties: true
      additionalProperties: true
  responses:
    BadRequest:
      description: The request body or parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: The workspace does not have enough available balance.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key is not permitted to perform this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: The resource state conflicts with the requested operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ProviderError:
      description: GENGEN or the asset provider could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: GENGEN API key
      description: A workspace API key beginning with gengen_live_.

````