> ## 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 on-demand model resource cost

> Estimates a model resource's on-demand hourly price without creating it.



## OpenAPI

````yaml openapi.yaml POST /rl/model-resources/estimate-cost
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:
  /rl/model-resources/estimate-cost:
    post:
      tags:
        - RL
      summary: Estimate on-demand model resource cost
      description: Estimates a model resource's on-demand hourly price without creating it.
      operationId: estimateModelResourcesCost
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RL.CreateModelResourcesRequest'
        required: true
      responses:
        '200':
          description: Estimated on-demand cost
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RL.ModelResourcesEstimateCostResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
components:
  schemas:
    RL.CreateModelResourcesRequest:
      type: object
      description: Request to provision a standalone model resource
      required:
        - base_model
      properties:
        base_model:
          type: string
          example: Qwen/Qwen3.5-4B
          description: >-
            Base model to provision the resource for, selected from
            /rl/supported-models
        base_weights_ref:
          type: string
          maxLength: 256
          pattern: ^together://ml_[A-Za-z0-9]+(@rv_[A-Za-z0-9]+)?$
          example: together://ml_A1b2C3d4E5f6G7h8I9j0K
          description: >-
            Model in this project's model registry whose weights the resource
            trains in place of the base model's own. It must be a full-weight
            model.
        compute_config:
          $ref: '#/components/schemas/RL.ComputeConfigCreateRequest'
          description: Compute layout to provision.
        lora_enabled:
          type: boolean
          default: true
          example: true
          description: >-
            Whether the resource hosts LoRA sessions or a single full-weight
            session
        optimizer_config:
          $ref: '#/components/schemas/RL.OptimizerConfig'
          description: Optimizer configuration for this resource.
    RL.ModelResourcesEstimateCostResponse:
      type: object
      properties:
        price_per_hour:
          type: number
          format: double
          example: 56
          description: Estimated on-demand price per hour in the currency's major unit.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code.
      required:
        - price_per_hour
        - currency
    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
    RL.ComputeConfigCreateRequest:
      type: object
      description: Compute layout to provision for a model resource
      properties:
        num_generator_replicas:
          type: integer
          format: int32
          example: 2
          default: 1
          description: >-
            Number of generator replicas. 0 runs the trainer only, with no
            generator.
        gpu_type:
          type: string
          example: B200-SXM
          enum:
            - H100-80GB
            - B200-SXM
          description: GPU type to provision. Omit to use the model's default GPU type.
    RL.OptimizerConfig:
      type: object
      description: Optimizer configuration
      properties:
        adam:
          $ref: '#/components/schemas/RL.AdamConfig'
          description: Use the Adam optimizer.
        muon:
          $ref: '#/components/schemas/RL.MuonConfig'
          description: Use the Muon optimizer.
    RL.AdamConfig:
      type: object
      description: Adam optimizer configuration
      properties: {}
      additionalProperties: false
      x-stainless-empty-object: true
    RL.MuonConfig:
      type: object
      description: Advanced configuration for the Muon optimizer.
      properties:
        scaling_strategy:
          $ref: '#/components/schemas/RL.MuonScalingStrategy'
          example: MUON_SCALING_STRATEGY_ORIGINAL
          default: MUON_SCALING_STRATEGY_MATCH_ADAM
          description: Scaling strategy for the Muon optimizer.
    RL.MuonScalingStrategy:
      type: string
      enum:
        - MUON_SCALING_STRATEGY_UNSPECIFIED
        - MUON_SCALING_STRATEGY_MATCH_ADAM
        - MUON_SCALING_STRATEGY_ORIGINAL
      default: MUON_SCALING_STRATEGY_UNSPECIFIED
  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.