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

# Generate recording AI field

> Generate the values of a recording AI field on a set of recordings, asynchronously. Target the recordings with `recordingIds` or with the `viewId` of a recording view. By default only the recordings without a value are processed; set `mode` to `Recompute` to regenerate every value. Only the recordings with a ready transcript that the creator can edit are processed, and `totalCount` only counts those. A generation covers at most 1,000 recordings: larger generations are rejected, never truncated. Set `estimateOnly` to get `totalCount` and `estimatedCredits` without starting the generation; an estimate fails whenever the real generation would. Follow the generation with `GET /v1/recordings/fields/generations/{generationId}`.

Generates the values of a recording AI field on a list of recordings or on the recordings of a view, asynchronously. By default only the recordings without a value are processed, and only those with a ready transcript that the creator can edit. Set `estimateOnly` to get the recording count and `estimatedCredits` without starting the generation. See [Generations](/api-reference/ai_fields#generations).


## OpenAPI

````yaml POST /v1/recordings/fields/{fieldId}/generations
openapi: 3.1.0
info:
  title: Claap API
  description: Development documentation
  version: 0.0.0
servers:
  - url: https://api.claap.io/
security:
  - ApiKey: []
paths:
  /v1/recordings/fields/{fieldId}/generations:
    post:
      description: >-
        Generate the values of a recording AI field on a set of recordings,
        asynchronously. Target the recordings with `recordingIds` or with the
        `viewId` of a recording view. By default only the recordings without a
        value are processed; set `mode` to `Recompute` to regenerate every
        value. Only the recordings with a ready transcript that the creator can
        edit are processed, and `totalCount` only counts those. A generation
        covers at most 1,000 recordings: larger generations are rejected, never
        truncated. Set `estimateOnly` to get `totalCount` and `estimatedCredits`
        without starting the generation; an estimate fails whenever the real
        generation would. Follow the generation with `GET
        /v1/recordings/fields/generations/{generationId}`.
      operationId: postV1RecordingsAiFieldsByAiFieldIdGenerations
      parameters:
        - in: path
          name: fieldId
          schema:
            type: string
            description: Recording AI field identifier
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                creatorEmail:
                  type: string
                  format: email
                  description: >-
                    Email address of the generation author. It must belong to an
                    active workspace member.
                recordingIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  maxItems: 1000
                  description: >-
                    Generate the field on these recordings, at most 1,000
                    identifiers: use `viewId` for larger sets. Exactly one of
                    `recordingIds` and `viewId` is required.
                viewId:
                  type: string
                  description: >-
                    Generate the field on the recordings of this view instead of
                    listing their identifiers. Use `GET /v1/recordings/views` to
                    discover views.
                mode:
                  type: string
                  enum:
                    - FillMissing
                    - Recompute
                  default: FillMissing
                  description: >-
                    `FillMissing` only generates the recordings without a value,
                    `Recompute` regenerates every recording.
                estimateOnly:
                  type: boolean
                  default: false
                  description: >-
                    Return `totalCount` and `estimatedCredits` without starting
                    the generation.
              required:
                - creatorEmail
            examples:
              recordingIds:
                summary: By recording ids
                value:
                  creatorEmail: jsmith@example.com
                  recordingIds:
                    - Tz8Gm3Kq1Vr6Hx4Nb2Jw7
                    - Hc5Wn9Rd2Lp7Fs3Qk6Bm1
                  mode: FillMissing
                  estimateOnly: false
              viewId:
                summary: By view, estimate only
                value:
                  creatorEmail: jsmith@example.com
                  viewId: Lk4Pw8Tn2Rj6
                  mode: Recompute
                  estimateOnly: true
      responses:
        '200':
          description: Recording AI field generation was successfully started
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/AiFieldGenerationStart'
                required:
                  - result
              example:
                result:
                  estimatedCredits: 2
                  generationId: CreateInsightsOp#Wd4Kp8Zr2Mx6Qt1Hs9Fb3
                  totalCount: 2
        '400':
          description: >-
            `creatorEmail` does not belong to an active workspace member, both
            or none of `recordingIds` and `viewId` are set, `recordingIds` has
            more than 1,000 items, the field is archived or manual (it has no
            prompt), or the generation covers more than 1,000 recordings
        '403':
          description: >-
            The workspace plan does not include AI fields, or the creator is a
            Guest
        '404':
          description: Recording AI field or view was not found
components:
  schemas:
    AiFieldGenerationStart:
      type: object
      properties:
        estimatedCredits:
          type: integer
          description: The estimated AI credit cost of the generation.
        generationId:
          type: string
          description: >-
            Generation identifier, used to follow and cancel the generation.
            Omitted when `estimateOnly` is set and when no record needs to be
            processed.
        totalCount:
          type: integer
          description: The number of records the generation processes.
      required:
        - estimatedCredits
        - totalCount
      description: The outcome of an AI field generation request.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````

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