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

# Create a fine-tuning job

> Available only to organizations enabled for fine-tuning; any other organization receives 400 invalid_request on every fine-tuning operation. Creates a queued reinforcement-learning fine-tuning job for one of the tunable models on the AutomationBench dataset (its 600 scored public tasks, split into 480 train and 120 held-out tasks with a fixed seed). Every setting is validated against fixed bounds, and an omitted setting (or an omitted settings object) takes its default. steps 0 creates an evaluation-only baseline. The job stays queued until a worker starts it. Idempotency-Key is required: a retry with the same key and body returns the created job.



## OpenAPI

````yaml /recursion/openapi.yaml post /managed-agents/v2/fine-tuning-jobs
openapi: 3.1.0
info:
  title: Managed Agents API
  version: 0.17.0
  description: >-
    The Recursion Managed Agents REST API. Authenticate with a Recursion API key
    as a bearer token. An organization-scoped key acts in its own organization
    and needs nothing else; a tenant-scoped key must also send
    `x-organization-id` with an organization id or `default`. Field names follow
    each operation's published schema.
servers:
  - url: https://api.recursion.labelbox.com
security:
  - bearerAuth: []
paths:
  /managed-agents/v2/fine-tuning-jobs:
    post:
      tags:
        - Fine-tuning
      summary: Create a fine-tuning job
      description: >-
        Available only to organizations enabled for fine-tuning; any other
        organization receives 400 invalid_request on every fine-tuning
        operation. Creates a queued reinforcement-learning fine-tuning job for
        one of the tunable models on the AutomationBench dataset (its 600 scored
        public tasks, split into 480 train and 120 held-out tasks with a fixed
        seed). Every setting is validated against fixed bounds, and an omitted
        setting (or an omitted settings object) takes its default. steps 0
        creates an evaluation-only baseline. The job stays queued until a worker
        starts it. Idempotency-Key is required: a retry with the same key and
        body returns the created job.
      operationId: managedAgentsCreateFineTuningJob
      parameters:
        - description: >-
            Replay-protection key in an organization-wide namespace shared by
            keyed mutations. It must contain 1 to 256 visible ASCII characters
            and be sent as exactly one header value. Request identity is the
            exact HTTP method, escaped path, raw query, and raw body bytes. The
            same request replays the original successful response; any different
            request returns 409 idempotency_conflict, and an active matching
            request returns 409 idempotency_in_progress. Completed receipts are
            retained for approximately 24 hours, pending claims may be reclaimed
            after approximately 1 hour, and no deduplication is guaranteed after
            expiry.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            description: >-
              Replay-protection key in an organization-wide namespace shared by
              keyed mutations. It must contain 1 to 256 visible ASCII characters
              and be sent as exactly one header value. Request identity is the
              exact HTTP method, escaped path, raw query, and raw body bytes.
              The same request replays the original successful response; any
              different request returns 409 idempotency_conflict, and an active
              matching request returns 409 idempotency_in_progress. Completed
              receipts are retained for approximately 24 hours, pending claims
              may be reclaimed after approximately 1 hour, and no deduplication
              is guaranteed after expiry.
            maxLength: 256
            minLength: 1
            pattern: ^[!-~]+$
            type: string
        - $ref: '#/components/parameters/RecursionTenantId'
        - $ref: '#/components/parameters/RecursionOrganizationId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FineTuningJobCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuningJob'
          description: Created
          headers:
            Idempotency-Replayed:
              description: True when this response replays an earlier completed request.
              schema:
                type: boolean
              style: simple
            Location:
              description: Relative URL of the created resource.
              schema:
                type: string
              style: simple
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidJson'
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                discriminator:
                  propertyName: code
                  mapping:
                    invalid_json: '#/components/schemas/ManagedAgentsApiErrorInvalidJson'
                    invalid_request: '#/components/schemas/ManagedAgentsApiErrorInvalidRequest'
                x-recursion-error-codes:
                  - invalid_json
                  - invalid_request
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnauthorized'
                x-recursion-error-codes:
                  - unauthorized
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorForbidden'
                x-recursion-error-codes:
                  - forbidden
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '404':
          description: Not Found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorNotFound'
                x-recursion-error-codes:
                  - not_found
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '409':
          headers:
            Retry-After:
              description: >-
                When present, delay in seconds or an HTTP-date after which the
                caller may retry; absence supplies no retry advice.
              schema:
                type: string
              style: simple
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Conflict.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ManagedAgentsApiErrorConflict'
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorIdempotencyConflict
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorIdempotencyInProgress
                discriminator:
                  propertyName: code
                  mapping:
                    conflict: '#/components/schemas/ManagedAgentsApiErrorConflict'
                    idempotency_conflict: >-
                      #/components/schemas/ManagedAgentsApiErrorIdempotencyConflict
                    idempotency_in_progress: >-
                      #/components/schemas/ManagedAgentsApiErrorIdempotencyInProgress
                x-recursion-error-codes:
                  - conflict
                  - idempotency_conflict
                  - idempotency_in_progress
        '413':
          description: Payload Too Large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorPayloadTooLarge'
                x-recursion-error-codes:
                  - payload_too_large
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '415':
          description: Unsupported Media Type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorUnsupportedMediaType'
                x-recursion-error-codes:
                  - unsupported_media_type
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '429':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: Too Many Requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorRateLimitExceeded'
                x-recursion-error-codes:
                  - rate_limit_exceeded
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorInternalError'
                x-recursion-error-codes:
                  - internal_error
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '502':
          description: A dependent service returned an invalid response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyFailure'
                x-recursion-error-codes:
                  - bad_gateway
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '503':
          description: Service Unavailable.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorIdempotencyUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                  - $ref: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                discriminator:
                  propertyName: code
                  mapping:
                    idempotency_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorIdempotencyUnavailable
                    managed_agents_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorManagedAgentsUnavailable
                    service_unavailable: >-
                      #/components/schemas/ManagedAgentsApiErrorServiceUnavailable
                x-recursion-error-codes:
                  - idempotency_unavailable
                  - managed_agents_unavailable
                  - service_unavailable
          headers:
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
        '504':
          headers:
            Retry-After:
              description: When to retry, as delay seconds or an HTTP date.
              schema:
                type: string
            recursion-organization-id:
              $ref: '#/components/headers/RecursionOrganizationId'
            recursion-tenant-id:
              $ref: '#/components/headers/RecursionTenantId'
          description: A dependent service timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedAgentsApiErrorDependencyTimeout'
                x-recursion-error-codes:
                  - gateway_timeout
components:
  parameters:
    RecursionTenantId:
      name: x-tenant-id
      in: header
      required: false
      description: >-
        Optional tenant consistency check. When present, it must name the tenant
        bound to the API key, including when x-organization-id is `default`.
      schema:
        minLength: 1
        type: string
    RecursionOrganizationId:
      name: x-organization-id
      in: header
      required: false
      description: >-
        Organization in which to act. Required for a tenant-scoped API key.
        Optional for an organization-scoped key, where it must name that same
        organization. The value may be an organization id or `default`.
      schema:
        minLength: 1
        type: string
  schemas:
    FineTuningJobCreateRequest:
      additionalProperties: false
      properties:
        dataset:
          description: The dataset to train and evaluate on.
          enum:
            - automationbench-public-600
          type: string
          x-recursion-write-validation-only: >-
            Create admits today's list; a stored job keeps the value it was
            admitted with.
        model:
          description: The base model to tune.
          enum:
            - thinkingmachines/Inkling-2-Small
            - nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
            - nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16
          type: string
          x-recursion-write-validation-only: >-
            Create admits today's list; a stored job keeps the value it was
            admitted with.
        settings:
          $ref: '#/components/schemas/FineTuningJobSettingsRequest'
      required:
        - model
        - dataset
      type: object
    FineTuningJob:
      properties:
        completedAt:
          description: When the job reached a final status; null until then.
          format: date-time
          readOnly: true
          type:
            - 'null'
            - string
        createdAt:
          format: date-time
          readOnly: true
          type: string
        dataset:
          type: string
        datasetProvenance:
          $ref: '#/components/schemas/FineTuningDatasetProvenance'
          description: The dataset revision and split recorded when the job was created.
        failure:
          $ref: '#/components/schemas/FineTuningJobFailure'
          description: Why the job failed; null unless status is failed.
        jobId:
          format: uuid
          readOnly: true
          type: string
        model:
          type: string
        progress:
          $ref: '#/components/schemas/FineTuningJobProgress'
        result:
          $ref: '#/components/schemas/FineTuningJobResult'
          description: >-
            What the job produced. Both fields are null until the trainer saves
            a checkpoint; an evaluation-only job never has one.
        settings:
          $ref: '#/components/schemas/FineTuningJobSettings'
        startedAt:
          description: When a worker started the job; null while it is queued.
          format: date-time
          readOnly: true
          type:
            - 'null'
            - string
        status:
          description: >-
            queued until a worker starts it; succeeded, failed and cancelled are
            final.
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
          readOnly: true
          type: string
        summary:
          $ref: '#/components/schemas/FineTuningJobSummaryScores'
          description: Scores derived from the job's metrics.
        updatedAt:
          format: date-time
          readOnly: true
          type: string
      required:
        - jobId
        - status
        - model
        - dataset
        - datasetProvenance
        - settings
        - progress
        - summary
        - result
        - failure
        - createdAt
        - updatedAt
        - startedAt
        - completedAt
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorInvalidJson:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_json
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInvalidRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - invalid_request
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnauthorized:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unauthorized
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorForbidden:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - forbidden
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorNotFound:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - not_found
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorConflict:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - conflict
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorIdempotencyConflict:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - idempotency_conflict
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorIdempotencyInProgress:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - idempotency_in_progress
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorPayloadTooLarge:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - payload_too_large
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorUnsupportedMediaType:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - unsupported_media_type
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorRateLimitExceeded:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - rate_limit_exceeded
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorInternalError:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - internal_error
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyFailure:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - bad_gateway
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorIdempotencyUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - idempotency_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorManagedAgentsUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - managed_agents_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorServiceUnavailable:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - service_unavailable
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    ManagedAgentsApiErrorDependencyTimeout:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Stable machine-readable error code.
          enum:
            - gateway_timeout
        message:
          type: string
          minLength: 1
          description: Human-readable error message.
        details:
          $ref: '#/components/schemas/ManagedAgentsApiErrorDetails'
          description: >-
            Optional structured error details. Reserved transport fields are
            typed; code-specific fields remain forward compatible.
      required:
        - code
        - message
      additionalProperties: false
      description: Standard flat error response.
    FineTuningJobSettingsRequest:
      additionalProperties: false
      description: >-
        Run settings. Each is validated against fixed bounds, and an omitted
        setting takes its default: two steps of four groups of four rollouts on
        the quick train tasks, evaluated after every step on the quick held-out
        tasks.
      properties:
        contextLength:
          default: 16384
          description: Maximum tokens of one rollout's context.
          maximum: 32768
          minimum: 256
          type: integer
        evalAttempts:
          default: 4
          description: >-
            Attempts per held-out task at each evaluation, for pass@k and
            pass^k.
          maximum: 16
          minimum: 1
          type: integer
        evalEvery:
          default: 1
          description: >-
            Steps between evaluations on held-out tasks. At most steps, or 1
            when steps is 0.
          maximum: 1000
          minimum: 1
          type: integer
        evalSet:
          default: quick
          description: >-
            Held-out tasks each evaluation runs on: quick, a small fixed subset
            of the split's easiest tasks, or full, the whole split.
          enum:
            - quick
            - full
          type: string
        groupSize:
          default: 4
          description: Rollouts sampled per task; rewards are compared within a group.
          maximum: 16
          minimum: 2
          type: integer
        groupsPerBatch:
          default: 4
          description: Task groups per training step.
          maximum: 32
          minimum: 1
          type: integer
        learningRate:
          default: 0.00004
          description: Optimizer learning rate.
          maximum: 0.001
          minimum: 1.e-7
          type: number
        loraRank:
          default: 32
          description: 'Rank of the LoRA adapter that is trained: one of [8 16 32 64].'
          maximum: 64
          minimum: 8
          type: integer
        steps:
          default: 2
          description: >-
            Training steps the job runs. 0 is an evaluation-only baseline that
            trains nothing and saves no checkpoint.
          maximum: 1000
          minimum: 0
          type: integer
        trainSet:
          default: quick
          description: >-
            Train tasks the job trains on: quick, a small fixed subset of the
            split's easiest tasks, or full, the whole split. A full train set is
            cycled.
          enum:
            - quick
            - full
          type: string
      type: object
      x-recursion-omission:
        source: Every setting takes its default.
        strategy: derive
    FineTuningDatasetProvenance:
      properties:
        heldOutTasks:
          description: Tasks in the held-out split.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        revision:
          description: The pinned AutomationBench commit the tasks come from.
          type: string
        splitSeed:
          description: >-
            Seed of the fixed shuffle that splits the tasks into train and
            held-out.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        trainTasks:
          description: Tasks in the train split.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      readOnly: true
      required:
        - revision
        - splitSeed
        - trainTasks
        - heldOutTasks
      type: object
      additionalProperties: false
    FineTuningJobFailure:
      properties:
        exitCode:
          description: >-
            The worker's exit code; null when it never exited, for example when
            it could not start.
          type:
            - 'null'
            - integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        reason:
          description: Why the job failed.
          type: string
      readOnly: true
      required:
        - exitCode
        - reason
      type:
        - object
        - 'null'
      additionalProperties: false
    FineTuningJobProgress:
      properties:
        ingestErrors:
          description: >-
            Lines the worker reported that could not be read and were skipped;
            each is an ingest_error event in the timeline.
          format: int64
          minimum: 0
          type: integer
          maximum: 9007199254740991
        lastEventAt:
          description: >-
            When the job last reported anything, heartbeats included. A running
            job whose lastEventAt grows old is stalled.
          format: date-time
          type:
            - 'null'
            - string
        phase:
          description: >-
            What the job is doing now: queued from creation, cancelled once
            cancelled.
          enum:
            - queued
            - provisioning
            - installing
            - setup
            - sampling
            - training
            - eval
            - checkpoint
            - finalizing
            - done
            - failed
            - cancelled
          type: string
        phaseStartedAt:
          description: >-
            When the current phase began; null while the job is queued, whose
            wait starts at createdAt.
          format: date-time
          type:
            - 'null'
            - string
        rollouts:
          $ref: '#/components/schemas/FineTuningRolloutCounts'
          description: The current step's rollouts of the current split, by status.
        split:
          description: >-
            The split the current phase works on; null outside sampling and
            evaluation.
          enum:
            - train
            - eval
            - null
          type:
            - 'null'
            - string
        step:
          description: The step the job is on; null outside a step.
          type:
            - 'null'
            - integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      readOnly: true
      required:
        - phase
        - step
        - split
        - phaseStartedAt
        - lastEventAt
        - rollouts
        - ingestErrors
      type: object
      additionalProperties: false
    FineTuningJobResult:
      properties:
        checkpointPath:
          description: >-
            The trainer's sampler checkpoint,
            tinker://<run>/sampler_weights/<name>.
          type:
            - 'null'
            - string
        tunedModel:
          description: The model id an agent selects to run the tuned model.
          type:
            - 'null'
            - string
      readOnly: true
      required:
        - checkpointPath
        - tunedModel
      type: object
      additionalProperties: false
    FineTuningJobSettings:
      description: The run settings the job trains with.
      properties:
        contextLength:
          description: Maximum tokens of one rollout's context.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        evalAttempts:
          description: >-
            Attempts per held-out task at each evaluation, for pass@k and
            pass^k.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        evalEvery:
          description: >-
            Steps between evaluations on held-out tasks. At most steps, or 1
            when steps is 0.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        evalSet:
          description: >-
            Held-out tasks each evaluation runs on: quick, a small fixed subset
            of the split's easiest tasks, or full, the whole split.
          enum:
            - quick
            - full
          type: string
        groupSize:
          description: Rollouts sampled per task; rewards are compared within a group.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        groupsPerBatch:
          description: Task groups per training step.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        learningRate:
          description: Optimizer learning rate.
          format: double
          type: number
        loraRank:
          description: Rank of the LoRA adapter that is trained.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        steps:
          description: >-
            Training steps the job runs. 0 is an evaluation-only baseline that
            trains nothing and saves no checkpoint.
          format: int64
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        trainSet:
          description: >-
            Train tasks the job trains on: quick, a small fixed subset of the
            split's easiest tasks, or full, the whole split. A full train set is
            cycled.
          enum:
            - quick
            - full
          type: string
      required:
        - learningRate
        - loraRank
        - groupSize
        - groupsPerBatch
        - steps
        - evalEvery
        - evalAttempts
        - trainSet
        - evalSet
        - contextLength
      type: object
      additionalProperties: false
    FineTuningJobSummaryScores:
      properties:
        evalReward:
          $ref: '#/components/schemas/FineTuningEvalReward'
      readOnly: true
      required:
        - evalReward
      type: object
      additionalProperties: false
    ManagedAgentsApiErrorDetails:
      type: object
      properties:
        field:
          description: >-
            Request field or header responsible for the error, when one can be
            identified.
          type: string
        issues:
          description: >-
            Boundary-validation failures as path-prefixed human-readable
            messages.
          type: array
          items:
            type: string
        requestId:
          description: Request correlation identifier for support and log lookup.
          type: string
        retryable:
          description: >-
            Server advice about failure transience. `true` means transient,
            `false` means non-transient, and absence gives no advice. Automatic
            replay is allowed only when this field is not `false` and the
            operation-specific retry and idempotency contract permits replay.
          type: boolean
      additionalProperties:
        $ref: '#/components/schemas/PlatformSafeJsonValue'
      description: >-
        Optional structured error details. Reserved transport fields are typed;
        code-specific fields remain forward compatible.
    FineTuningRolloutCounts:
      properties:
        done:
          format: int64
          minimum: 0
          type: integer
          maximum: 9007199254740991
        failed:
          format: int64
          minimum: 0
          type: integer
          maximum: 9007199254740991
        queued:
          format: int64
          minimum: 0
          type: integer
          maximum: 9007199254740991
        running:
          format: int64
          minimum: 0
          type: integer
          maximum: 9007199254740991
        total:
          format: int64
          minimum: 0
          type: integer
          maximum: 9007199254740991
      required:
        - queued
        - running
        - done
        - failed
        - total
      type: object
      additionalProperties: false
    FineTuningEvalReward:
      properties:
        base:
          description: >-
            Held-out reward at the first evaluation, before training; null until
            evaluated.
          type:
            - 'null'
            - number
        final:
          description: Held-out reward at the latest evaluation; null until evaluated.
          type:
            - 'null'
            - number
      required:
        - base
        - final
      type: object
      additionalProperties: false
    PlatformSafeJsonValue:
      description: >-
        A JSON value whose integer members stay within the exact ECMAScript
        safe-integer range at every nesting level.
      oneOf:
        - type: 'null'
        - type: boolean
        - type: string
        - type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        - type: number
          not:
            type: integer
        - type: array
          items:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
        - additionalProperties:
            $ref: '#/components/schemas/PlatformSafeJsonValue'
          type: object
  headers:
    RecursionOrganizationId:
      description: Organization id resolved for this request.
      schema:
        minLength: 1
        type: string
    RecursionTenantId:
      description: Tenant id resolved for this request.
      schema:
        minLength: 1
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recursion API key, created in the console under API keys.

````