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

# Train

> Manually trigger a fine-tune for a domain ranker.

By default, fine-tunes run automatically once the triplet budget for a domain is reached. Use this endpoint to force a run sooner: right after a major product change, a marketing push that shifts your user mix, or to validate that newly added outcomes flow through.

<CodeGroup>
  ```bash curl theme={"dark"}
  curl https://api.jeantechnologies.com/v1/train \
    -H "Authorization: Bearer $JEAN_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "domain": "dating", "force": true }'
  ```

  ```python Python theme={"dark"}
  requests.post(
      "https://api.jeantechnologies.com/v1/train",
      headers={"Authorization": f"Bearer {os.environ['JEAN_API_KEY']}"},
      json={"domain": "dating", "force": True},
  ).json()
  ```

  ```ts TypeScript theme={"dark"}
  const res = await fetch("https://api.jeantechnologies.com/v1/train", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.JEAN_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ domain: "dating", force: true }),
  });
  ```
</CodeGroup>

## Example response

```json theme={"dark"}
{
  "domain": "dating",
  "status": "queued",
  "run_id": "tr_2026_05_17_001",
  "triplets_used": 4218,
  "estimated_completion_minutes": 35
}
```

The call returns immediately. The actual fine-tune runs async, typically 15 to 60 minutes depending on triplet volume. The new head is deployed when training completes; subsequent `/match` requests automatically use it.

<Tip>
  We notify the email on file when a run completes. Webhook callbacks land in a later release.
</Tip>


## OpenAPI

````yaml POST /train
openapi: 3.1.0
info:
  title: Jean Technologies API
  version: 1.0.0
  description: >-
    Matching infrastructure for AI-era platforms. Ingest user context, retrieve
    compatible candidates, send outcomes back.
servers:
  - url: https://api.jeantechnologies.com/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /train:
    post:
      tags:
        - Feedback & Training
      summary: Train
      description: >-
        Manually trigger a fine-tune for a domain ranker. Auto-triggered past
        the triplet budget unless `force=true`.
      operationId: trainDomain
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainRequest'
      responses:
        '200':
          description: Training run queued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainResponse'
components:
  schemas:
    TrainRequest:
      type: object
      required:
        - domain
      properties:
        domain:
          type: string
          example: dating
        force:
          type: boolean
          default: false
          description: Run even if the triplet budget has not been reached.
    TrainResponse:
      type: object
      properties:
        domain:
          type: string
          example: dating
        status:
          type: string
          example: queued
        run_id:
          type: string
          example: tr_2026_05_17_001
        triplets_used:
          type: integer
          example: 4218
        estimated_completion_minutes:
          type: integer
          example: 35
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key issued by Jean Technologies. Contact the team for access.

````