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

# Translate a whole page with AI

> Start a durable AI translation job for the variant's saved draft. The agent rewrites every user-visible string in the page files into the target language and updates the page language, title and SEO settings. `destination` picks where the translation lands: `this_variant` edits the variant in place, `new_variant` clones it into a new variant of the same lander first, `new_lander` clones the whole lander and translates the matching variant there; `name` names the new variant or lander. Returns 202 with a `jobId` and the id of the variant being translated; the job runs to completion regardless of the client and cannot be cancelled. Poll translate/jobs/{jobId} on that variant until its status is success or failed, then reload the variant.



## OpenAPI

````yaml https://backend-v2.landerlab.workers.dev/api/v2/openapi.json post /api/v2/workspaces/{workspaceId}/editors/{variantId}/translate/page
openapi: 3.1.0
info:
  title: LanderLab API
  version: 2.0.0
  description: >-
    LanderLab public API. Authenticate with an API key using the X-API-Key
    header.
servers:
  - url: https://api.landerlab.dev
    description: Production
security: []
tags:
  - name: Account
    description: >-
      Discover the organization and workspaces your API key can access. Start
      here.
  - name: Workspaces
    description: List and manage workspaces.
  - name: Landers
    description: Create, update, publish and manage landers.
  - name: A/B Testing
    description: Manage variants and split-test weights.
  - name: Editor
    description: Load and save lander content and settings.
  - name: Analytics
    description: Query unified analytics across workspaces, landers and variants.
  - name: Leads
    description: Retrieve captured leads.
  - name: Integrations
    description: Manage account-level integrations.
  - name: Lander Integrations
    description: Attach and toggle integrations on landers.
  - name: Domains
    description: Manage custom domains.
  - name: Folders
    description: Organize landers into folders.
paths:
  /api/v2/workspaces/{workspaceId}/editors/{variantId}/translate/page:
    post:
      tags:
        - Editor
      summary: Translate a whole page with AI
      description: >-
        Start a durable AI translation job for the variant's saved draft. The
        agent rewrites every user-visible string in the page files into the
        target language and updates the page language, title and SEO settings.
        `destination` picks where the translation lands: `this_variant` edits
        the variant in place, `new_variant` clones it into a new variant of the
        same lander first, `new_lander` clones the whole lander and translates
        the matching variant there; `name` names the new variant or lander.
        Returns 202 with a `jobId` and the id of the variant being translated;
        the job runs to completion regardless of the client and cannot be
        cancelled. Poll translate/jobs/{jobId} on that variant until its status
        is success or failed, then reload the variant.
      parameters:
        - name: variantId
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                target_lang:
                  type: string
                model:
                  type: string
                destination:
                  type: string
                  enum:
                    - this_variant
                    - new_variant
                    - new_lander
                  default: this_variant
                name:
                  type: string
                  maxLength: 250
              required:
                - target_lang
      responses:
        '202':
          description: Translation job started
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobId:
                    type: string
                  variantId:
                    type: number
                  landerId:
                    type: number
                  destination:
                    type: string
                    enum:
                      - this_variant
                      - new_variant
                      - new_lander
                  status:
                    type: string
                    const: pending
                required:
                  - jobId
                  - variantId
                  - landerId
                  - destination
                  - status
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with ll_live_ prefix

````