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

# Estimate FP4 preparation cost

> Reports the price and expected wall-clock time for preparing the named adapter without creating a job. The request body is the same as POST /shaping/prepare-for-fp4-inference, so a caller can price exactly the job it is about to submit.




## OpenAPI

````yaml openapi.yaml POST /shaping/prepare-for-fp4-inference/estimate
openapi: 3.1.0
info:
  title: Together APIs
  description: The Together REST API. See https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.ai/v1
    description: Default environment for APIs
  - url: https://api-inference.together.ai/v2
    description: Optimized environment for inference
security:
  - bearerAuth: []
paths:
  /shaping/prepare-for-fp4-inference/estimate:
    post:
      tags:
        - Shaping
      summary: Estimate FP4 preparation cost
      description: >
        Reports the price and expected wall-clock time for preparing the named
        adapter without creating a job. The request body is the same as POST
        /shaping/prepare-for-fp4-inference, so a caller can price exactly the
        job it is about to submit.
      operationId: estimateQuantizationJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantizationRequest'
      responses:
        '200':
          description: Estimate for the described job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantizationEstimate'
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
        '503':
          description: Preparing models for FP4 inference is not available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
components:
  schemas:
    QuantizationRequest:
      type: object
      description: Request body for preparing an adapter for FP4 inference.
      required:
        - inputs
      properties:
        inputs:
          $ref: '#/components/schemas/QuantizationPipelineInputs'
          description: Adapter inputs to prepare.
    QuantizationEstimate:
      type: object
      description: Price and duration estimate for a quantization job.
      required:
        - price_usd
        - time_hours
        - credit_limit
        - allowed_to_proceed
      properties:
        price_usd:
          type: number
          format: double
          description: Expected total run cost in US dollars.
          example: 28.76
        time_hours:
          type: number
          format: double
          description: Expected wall-clock run time in hours, excluding queue time.
          example: 4
        credit_limit:
          type: number
          format: double
          description: Project credit limit in US dollars.
          example: 500
        allowed_to_proceed:
          type: boolean
          description: Whether a create request at this price would be accepted.
          example: true
    ErrorData:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              nullable: false
            type:
              type: string
              nullable: false
            param:
              type: string
              nullable: true
              default: null
            code:
              type: string
              nullable: true
              default: null
          required:
            - type
            - message
    QuantizationPipelineInputs:
      type: object
      description: Adapter identifiers to prepare.
      required:
        - adapter_object_id
      properties:
        adapter_object_id:
          type: string
          pattern: ^ml_.+
          description: Model object ID of the adapter to prepare.
        adapter_revision_id:
          type: string
          pattern: ^rv_.+
          description: >-
            Adapter revision ID to prepare. Omit to use the adapter's current
            revision.
        calibration_file_id:
          type: string
          pattern: ^file-.+
          description: >
            Conversation dataset file ID to use for calibration. Upload it first
            with `POST /v1/files` using purpose `calibration` and file type
            `jsonl`. Each JSONL row must contain a `messages` array and may
            contain a `tools` array.

            When provided, the job draws half of the calibration corpus from
            this file and half from a general-text corpus. When omitted, the job
            calibrates on the general-text corpus only.

            The request is rejected unless the file exists in the request
            project, has finished uploading, has passed files API validation as
            a conversation dataset, is not empty, and is at most 64 MiB. A
            `fine-tune` purpose file is also accepted so a training file can be
            reused.
          example: file-5f1b0c7a-2d19-4a3e-9c60-8ab41c2f7d35
      example:
        adapter_object_id: ml_CeG3fF6pyEViU8dE8pk7R
        adapter_revision_id: rv_CeG3faPBj2ABwbAaHPTmx
        calibration_file_id: file-5f1b0c7a-2d19-4a3e-9c60-8ab41c2f7d35
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````

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