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

# Estimate a job's cost



## OpenAPI

````yaml https://api.blon.ai/v1/openapi.json post /estimate
openapi: 3.1.0
info:
  title: Blon API
  version: v1
servers:
  - url: https://api.blon.ai/v1
security: []
paths:
  /estimate:
    post:
      summary: Estimate a job's cost
      operationId: estimateJob
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobRequest'
      responses:
        '200':
          description: The price a submission would reserve now.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Estimate'
        '400':
          description: '`bad_request`, `invalid_input`, `unknown_parameter`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: '`unauthorized`, `session_not_accepted`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: '`insufficient_credits`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            `forbidden`, `spending_disabled`, `monthly_cap_exceeded`,
            `api_key_spend_limit_exceeded`, `insufficient_scope`,
            `plan_required`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: '`not_found`, `model_not_found`, `workspace_not_found`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '408':
          description: '`request_timeout` (retryable)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: >-
            `conflict`, `idempotency_conflict`, `model_price_unavailable`,
            `job_not_cancelable`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '412':
          description: '`precondition_failed`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '413':
          description: '`payload_too_large`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '415':
          description: '`unsupported_media_type`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: '`input_media_unreadable`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            `queue_full` (retryable), `concurrency_limit` (retryable),
            `rate_limited` (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: '`internal_error` (retryable)'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '501':
          description: '`not_implemented`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '502':
          description: '`provider_submission_failed`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: >-
            `provider_capacity_exceeded` (retryable), `provider_unavailable`
            (retryable), `model_disabled` (retryable), `service_unavailable`
            (retryable)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - bearer: []
        - apiKey: []
components:
  schemas:
    JobRequest:
      type: object
      properties:
        model:
          type: string
          minLength: 1
        input:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        webhook_url:
          type: string
        metadata:
          type: object
          propertyNames:
            type: string
          additionalProperties: {}
        workspace_id:
          type: string
          minLength: 1
      required:
        - model
        - input
      additionalProperties: false
    Estimate:
      type: object
      properties:
        model:
          type: string
        cost:
          type: object
          properties:
            currency:
              type: string
              enum:
                - CREDITS
                - USD
            amount:
              type: string
          required:
            - currency
            - amount
        kind:
          type: string
          enum:
            - exact
            - upper_bound
        reason:
          type:
            - string
            - 'null'
      required:
        - model
        - cost
        - kind
        - reason
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - bad_request
                - invalid_input
                - unknown_parameter
                - unauthorized
                - session_not_accepted
                - insufficient_credits
                - forbidden
                - spending_disabled
                - monthly_cap_exceeded
                - api_key_spend_limit_exceeded
                - insufficient_scope
                - plan_required
                - not_found
                - model_not_found
                - workspace_not_found
                - request_timeout
                - conflict
                - idempotency_conflict
                - model_price_unavailable
                - job_not_cancelable
                - precondition_failed
                - payload_too_large
                - unsupported_media_type
                - input_media_unreadable
                - queue_full
                - concurrency_limit
                - rate_limited
                - internal_error
                - not_implemented
                - provider_submission_failed
                - provider_capacity_exceeded
                - provider_unavailable
                - model_disabled
                - service_unavailable
            message:
              type: string
            request_id:
              type: string
            retryable:
              type: boolean
            retry_after_seconds:
              type:
                - number
                - 'null'
            details: {}
          required:
            - code
            - message
            - request_id
            - retryable
            - retry_after_seconds
            - details
      required:
        - error
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

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