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

> ## Agent Instructions
> Arcmira has three API capabilities: Search (entities, mentions, appearances, commercial intelligence), Monitors (trackers plus alert delivery), and Transcripts (read, generate, correct). Community Review is the cross-surface correction layer.
> Discover pages at https://docs.arcmira.com/llms.txt, then fetch the matching page's .md export. Each capability has a self-contained '<capability> for coding agents' page; prefer it.
> Auth: Authorization: Bearer arc_sk_... or x-api-key: arc_sk_... (x-api-key wins if both are sent). Never put keys in browser code. Check GET /v1/me for tier, scopes, and remaining rows before metered pulls.
> Search: resolve names with GET /v1/entities/lookup and pin ent_* IDs before pulling metered rows. Only person entities have appearances. Mention and recommendation rows carry canonical numeric timestamps in start_seconds/end_seconds (integer seconds; 0 means full episode); the MM:SS string fields are deprecated. Commercial routes need Pro+ tier AND the recommendations:read scope and bill 10 rows per row.
> Monitors: a tracker watches one entity; a monitor groups trackers with shared delivery (email, Slack, HMAC-signed webhooks). Create trackers with POST /v1/trackers, then attach by id: POST /v1/monitors/{id}/trackers { trackerIds: [...] }. Each fired alert occurrence debits 100 rows. Poll GET /v1/monitors/{id}/alerts?n= for recent deliveries. Send Idempotency-Key on every POST/PATCH.
> Transcripts: switch on the access field (unlocked, locked, premium_pending, not_transcribed, unauthenticated). Honor Retry-After when polling POST /v1/transcriptions jobs. Corrections (POST /v1/videos/{video_id}/corrections; kinds line_edit, speaker_reassign, speaker_identify, add_person, entity_tag, segment_rewrite) cost 0 rows; anchored kinds need revision + anchor.contentHash (djb2 base-36); handle 409 (re-anchor) and 412 (expectedSeq). segment_rewrite replaces an inclusive segment range with new segments (empty replacements array deletes; timestamps repaired server-side).
> Community Review is free (0 rows) and surface-typed: POST /v1/feedback with a type matching the surface you called, the reproducing query, and corrections targeting public IDs (ent_*, men_*, com_*). Nothing auto-applies. Do not send untyped notes.
> Errors: switch on error.code, follow doc_url, quote X-Request-Id to support. Honor Retry-After on 429. Retries of POST/PATCH must reuse the same Idempotency-Key; replays return Idempotency-Replayed: true.

# Submit a transcript correction

> Unified corrections ingestion for all kinds: line_edit, speaker_reassign, speaker_identify, add_person, entity_tag, segment_rewrite. Corrections are free (0 rows) and land as pending-review rows attributed to your API key; speaker_identify/add_person also create a community-flagged appearance immediately. segment_rewrite is the structural primitive: it replaces an inclusive segment range with new segments (an empty replacements array deletes the range); timestamps can be pinned per replacement with optional start/end seconds, and unpinned times are repaired by char-proportional interpolation between pins. Anchored kinds (line_edit, speaker_reassign, entity_tag, segment_rewrite) must echo the transcript `meta.revision` and an `anchor` ({ segmentIndex, contentHash: djb2 of the covered segment text }). Error semantics for outbox-style clients: 409 = revision/anchor mismatch — the transcript changed underneath the correction (body { reason, currentRevision }); drop or re-anchor the event and continue — the sequence number is consumed. 412 = seq mismatch (body { expectedSeq }); refetch the transcript, rebase local counters, and resend. Supports the Idempotency-Key header (client event UUID): replays return the stored final response verbatim with Idempotency-Replayed: true.



## OpenAPI

````yaml /openapi/arcmira-v1.json post /v1/videos/{video_id}/corrections
openapi: 3.1.0
info:
  title: Arcmira API
  version: 1.0.0
  contact:
    name: Arcmira
    url: https://arcmira.com
servers:
  - url: https://api.arcmira.com
security: []
paths:
  /v1/videos/{video_id}/corrections:
    post:
      tags:
        - Corrections
      summary: Submit a transcript correction
      description: >-
        Unified corrections ingestion for all kinds: line_edit,
        speaker_reassign, speaker_identify, add_person, entity_tag,
        segment_rewrite. Corrections are free (0 rows) and land as
        pending-review rows attributed to your API key;
        speaker_identify/add_person also create a community-flagged appearance
        immediately. segment_rewrite is the structural primitive: it replaces an
        inclusive segment range with new segments (an empty replacements array
        deletes the range); timestamps can be pinned per replacement with
        optional start/end seconds, and unpinned times are repaired by
        char-proportional interpolation between pins. Anchored kinds (line_edit,
        speaker_reassign, entity_tag, segment_rewrite) must echo the transcript
        `meta.revision` and an `anchor` ({ segmentIndex, contentHash: djb2 of
        the covered segment text }). Error semantics for outbox-style clients:
        409 = revision/anchor mismatch — the transcript changed underneath the
        correction (body { reason, currentRevision }); drop or re-anchor the
        event and continue — the sequence number is consumed. 412 = seq mismatch
        (body { expectedSeq }); refetch the transcript, rebase local counters,
        and resend. Supports the Idempotency-Key header (client event UUID):
        replays return the stored final response verbatim with
        Idempotency-Replayed: true.
      operationId: submit_correction
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - line_edit
                    - speaker_reassign
                    - speaker_identify
                    - add_person
                    - entity_tag
                    - segment_rewrite
                seq:
                  type: integer
                  exclusiveMinimum: 0
                  description: >-
                    Per-video monotonic sequence number (strict FIFO per
                    user+video). Optional for one-off submissions; required for
                    outbox-style clients that depend on ordering. Any mismatch
                    returns 412 with the expected value.
                revision:
                  type: string
                  description: >-
                    The meta.revision from the transcript GET this correction
                    was made against. Required for line_edit, speaker_reassign,
                    entity_tag, and segment_rewrite.
                anchor:
                  type: object
                  properties:
                    segmentIndex:
                      type: integer
                      minimum: 0
                    contentHash:
                      type: string
                      minLength: 1
                      description: >-
                        djb2 hash of the covered segment text (joined with \n
                        for ranges), computed against your projected view of the
                        transcript.
                  required:
                    - segmentIndex
                    - contentHash
                  description: >-
                    Required for line_edit, speaker_reassign, entity_tag, and
                    segment_rewrite.
                payload:
                  type: object
                  additionalProperties: {}
                  description: >-
                    Kind-specific payload. line_edit: { segmentIndex,
                    originalText, correctedText }. speaker_reassign: {
                    selection: { startIndex, startChar, endIndex, endChar },
                    target: { kind: existing|new|role, speakerId, label?, role?
                    } }. speaker_identify: { speakerId, entityId }. add_person:
                    { speakerId, name }. entity_tag: { segmentIndex, charStart,
                    charEnd, entityId } or { segmentIndex, charStart, charEnd,
                    proposedName, proposedType }. segment_rewrite: { startIndex,
                    endIndex, replacements: [{ text, speaker?, start?, end? }] }
                    — replaces the inclusive segment range with the replacements
                    (max 50 source segments, 50 replacements, 2000 chars each);
                    an empty array deletes the range. Timestamps: optional
                    start/end pins (seconds, non-decreasing across the list) fix
                    times explicitly; every unpinned time is interpolated
                    char-proportionally between the surrounding pins (outer
                    bounds default to the source time range). A replacement
                    without speaker inherits from the source segment its
                    repaired start time falls in; startIndex must equal
                    anchor.segmentIndex and the anchor contentHash covers
                    startIndex through endIndex.
              required:
                - kind
                - payload
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorrectionAcceptedResponse'
        '201':
          description: >-
            Correction accepted ({ ok, kind, result }; result.id withdraws it
            later)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorrectionAcceptedResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '402':
          description: Quota exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '403':
          description: Permission error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '412':
          description: Sequence mismatch ({ error, expectedSeq }) — refetch, rebase, resend
          content:
            application/json:
              schema: {}
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      param:
                        type: string
                      doc_url:
                        type: string
                      request_id:
                        type: string
                    required:
                      - type
                      - code
                      - message
                      - doc_url
                      - request_id
                required:
                  - error
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    CorrectionAcceptedResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - true
          description: Always true on acceptance.
        kind:
          type: string
          enum:
            - line_edit
            - speaker_reassign
            - speaker_identify
            - add_person
            - entity_tag
            - segment_rewrite
          description: The correction kind, echoed back.
        result:
          type: object
          additionalProperties: {}
          description: >-
            The stored pending-review row (kind-specific fields). Always carries
            the row id: use it with the matching withdrawal DELETE.
      required:
        - ok
        - kind
        - result
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: arc_sk_*
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````