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

# Estimate the fee of continuing a family

> The exact fee `POST /v1/families/{family}/continue` would hold for the same body now,
without max_price_usd, worked out as the continuation does: the same new rows and the same
sample of earlier rows. Nothing is queued or held. The estimate is exact if nothing
changes before you start; pass it as max_price_usd to cap the price. While a large dataset
version's training tokens are first counted, it answers 503 tokens_counting with
Retry-After: ask again then.



## OpenAPI

````yaml /openapi.json post /v1/families/{family}/continue/estimate
openapi: 3.1.0
info:
  title: OneHot API
  description: >-
    Decisions your application can act on: send a context and the questions you
    want answered, and get a probability for every answer you allow.
    Authenticate with `Authorization: Bearer onehot_sk_...`. A short guide for
    coding agents is at /llms.txt. An API key reads its account but never
    changes it: keys, billing and settings change in the console. Money fields
    ending in _usd are exact decimal strings, never integer cents. Over a rate
    limit a request gets 429 with Retry-After, and one with more input tokens
    than your minute allows gets 422 too_many_tokens.
  version: 0.1.0
servers:
  - url: https://api.sqwish.ai
security: []
tags:
  - name: Decisions
    description: Probabilities for questions with fixed outcomes.
  - name: Models
    description: Base models, and fine-tuned models by their numbers.
  - name: Families
    description: >-
      Lines of models trained on one dataset, and the switches that let them
      answer calls.
  - name: Datasets
    description: >-
      Validated training examples. A dataset grows in versions, and a version
      never changes.
  - name: Evaluations
    description: Reusable model results on a dataset's fixed evaluation rows.
  - name: Fine-tuning
    description: Training jobs, their events and held-out results.
  - name: Prompt tuning
    description: Better wording for a decision, tested on your rows. Words, not weights.
  - name: Labeling
    description: Teacher labels for real queries, reviewed by you.
  - name: Accounts
    description: Email OTP sign-in, revocable sessions, security and API keys.
  - name: Billing
    description: Exact USD balances, purchases, automatic top-ups and referrals.
  - name: Integrations
    description: Endpoints other tools call, such as Claude Code.
  - name: System
    description: Health and discovery.
paths:
  /v1/families/{family}/continue/estimate:
    post:
      tags:
        - Families
      summary: Estimate the fee of continuing a family
      description: >-
        The exact fee `POST /v1/families/{family}/continue` would hold for the
        same body now,

        without max_price_usd, worked out as the continuation does: the same new
        rows and the same

        sample of earlier rows. Nothing is queued or held. The estimate is exact
        if nothing

        changes before you start; pass it as max_price_usd to cap the price.
        While a large dataset

        version's training tokens are first counted, it answers 503
        tokens_counting with

        Retry-After: ask again then.
      operationId: estimateFamilyContinue
      parameters:
        - name: family
          in: path
          required: true
          schema:
            type: string
            title: Family
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/ContinueEstimate'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  currency:
                    type: string
                    const: USD
                    title: Currency
                  price_usd:
                    description: >-
                      The fee a fine-tune started now with the same body would
                      hold, as exact USD: its base's
                      fine_tune_million_tokens_usd for trained_tokens, and at
                      least fine_tune_minimum_usd. 0 when it would be free. The
                      job's price_usd is this sum while the prices, the account,
                      the dataset and the family stay as they are; send it as
                      max_price_usd, and a job that would cost more is refused
                      with price_changed.
                    title: Price Usd
                    type: string
                  minimum_applied:
                    description: >-
                      True when the fee is fine_tune_minimum_usd, which is more
                      than its training tokens cost.
                    title: Minimum Applied
                    type: boolean
                  trained_tokens:
                    anyOf:
                      - type: integer
                      - type: 'null'
                    description: >-
                      The training tokens it would train, as the job's
                      split.trained_tokens counts them. Null only for a free
                      fine-tune whose rows can't be counted.
                    title: Trained Tokens
                  steps:
                    description: 'Its training steps: the ones sent, or the default passes.'
                    title: Steps
                    type: integer
                  seed:
                    description: Its seed, which orders the rows its steps take.
                    title: Seed
                    type: integer
                  passes:
                    description: >-
                      How many times its steps go over its training rows, to two
                      decimals.
                    title: Passes
                    type: number
                  train_rows:
                    description: >-
                      The training rows it trains on: a continuation's new rows
                      and the earlier rows sampled with them.
                    title: Train Rows
                    type: integer
                  rows:
                    $ref: '#/components/schemas/ContinueRows'
                    description: >-
                      The rows it would take, as a family's `continue` counts
                      them. A new family's training rows are all new.
                  dataset_version:
                    description: >-
                      The dataset version it would train on: the one the body
                      names, or its newest.
                    title: Dataset Version
                    type: integer
                required:
                  - currency
                  - price_usd
                  - minimum_applied
                  - trained_tokens
                  - steps
                  - seed
                  - passes
                  - train_rows
                  - rows
                  - dataset_version
                title: FineTuneEstimate
                type: object
        4XX:
          description: >-
            Client error. On a 422, `error.details` lists each field that
            failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        5XX:
          description: Server error. A 503 names what is not running on this server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ContinueEstimate:
      properties:
        hyperparameters:
          $ref: '#/components/schemas/Hyperparameters'
        latest:
          anyOf:
            - type: string
              maxLength: 140
            - type: 'null'
          title: Latest
          description: >-
            The id of the family's latest model you saw, or null for none. If
            the family has moved on since, nothing is queued and the request is
            refused with family_changed.
        dataset_version:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Dataset Version
          description: >-
            The version of the family's dataset to train on, its newest when
            left out. It trains on the rows added up to that version, which must
            be newer than the one the family's last finished job trained on, or
            the request is refused with no_new_data.
      additionalProperties: false
      type: object
      title: ContinueEstimate
      description: >-
        A family's next fine-tune, from its latest model on its dataset's newer
        rows, as its

        estimate takes it: the body that starts it, without max_price_usd.
    ContinueRows:
      properties:
        new:
          type: integer
          title: New
          description: Training rows added since the family last trained.
        earlier:
          type: integer
          title: Earlier
          description: Earlier training rows sampled to train on with them.
        evaluation:
          type: integer
          title: Evaluation
          description: Evaluation rows its gate would measure on.
      type: object
      required:
        - new
        - earlier
        - evaluation
      title: ContinueRows
    ErrorResponse:
      description: The body of every error.
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorResponse
      type: object
    Hyperparameters:
      properties:
        steps:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Steps
          description: >-
            Training steps. Left out, the policy's default passes over the
            actual training split, with a minimum of 20 steps. At most the
            policy's allowed passes, or 20 steps: more gets 422 too_many_steps,
            which gives the most. The fee is per training token trained, so more
            steps train more tokens and cost more.
        learning_rate:
          type: number
          maximum: 0.01
          exclusiveMinimum: 0
          title: Learning Rate
          default: 0.00005
        lora_rank:
          type: integer
          minimum: 1
          title: Lora Rank
          description: >-
            The LoRA rank of the adapter, from 1 to 16, the highest at launch.
            Left out, 8. A rank above 16 is refused with `rank_unsupported` when
            the job is accepted. A continuation keeps its parent's rank.
          default: 8
        seed:
          type: integer
          maximum: 2147483647
          minimum: 0
          title: Seed
          default: 42
      additionalProperties: false
      type: object
      title: Hyperparameters
    ErrorBody:
      properties:
        code:
          description: A stable code to branch on, such as invalid_request.
          title: Code
          type: string
        message:
          description: What went wrong and what to change, in plain words.
          title: Message
          type: string
        retryable:
          description: >-
            True when another attempt may succeed; it does not prove that no
            work was done. Respect Retry-After when present. Only operations
            that support Idempotency-Key replay a prior result, including
            /v1/decide for 24 hours.
          title: Retryable
          type: boolean
        request_id:
          description: Also sent as X-Request-ID. Quote it in bug reports.
          title: Request Id
          type: string
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          default: null
          description: On validation errors, one entry for each field that failed.
          title: Details
      required:
        - code
        - message
        - retryable
        - request_id
      title: ErrorBody
      type: object
    ErrorDetail:
      properties:
        path:
          description: Where the problem is, such as ["body", "decisions", 0, "outcomes"].
          items:
            anyOf:
              - type: string
              - type: integer
          title: Path
          type: array
        message:
          title: Message
          type: string
        type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Type
      required:
        - path
        - message
      title: ErrorDetail
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: onehot_sk_...
      description: Create an API key in the console.

````

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