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

# Register custom model pricing

> Register custom token pricing for models you host. Entries are versioned: a price change closes the current row and opens a new one, so historic spend keeps the rate it was billed at.
The returned id is what you attach with the `costgraph.ai/pricing-id.model` label or tag. Each version carries its own id, so read the live entry back after a price change instead of holding on to an earlier one.



## OpenAPI

````yaml https://raw.githubusercontent.com/baselinehq/mintlify-docs/main/api-reference/openapi.json post /marketplace/providers/models
openapi: 3.0.1
info:
  title: CostGraph Pricing API
  description: Provides API level access to the Costgraph Services.
  termsOfService: https://costgraph.baselinehq.cloud/terms-of-use
  contact:
    name: Customer Support
    url: https://costgraph.baselinehq.cloud/support
    email: contact@baselinehq.cloud
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://pricing.baselinehq.cloud/
security: []
paths:
  /marketplace/providers/models:
    post:
      summary: Register custom model pricing
      description: >-
        Register custom token pricing for models you host. Entries are
        versioned: a price change closes the current row and opens a new one, so
        historic spend keeps the rate it was billed at.

        The returned id is what you attach with the
        `costgraph.ai/pricing-id.model` label or tag. Each version carries its
        own id, so read the live entry back after a price change instead of
        holding on to an earlier one.
      requestBody:
        description: Custom model pricing request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.CustomModelPriceRequest'
        required: true
      responses:
        '200':
          description: Pricing response for custom model pricing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.CustomModelPricingResponse'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
        '401':
          description: Host and organization do not match
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    handler.CustomModelPriceRequest:
      required:
        - entries
      type: object
      properties:
        entries:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/models.ModelPricing'
    handler.CustomModelPricingResponse:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/models.ModelPricing'
        status:
          $ref: >-
            #/components/schemas/github_com_baselinehq_pricingapi_pkg_types.Status
    handler.ErrorResponse:
      type: object
      properties:
        error:
          type: string
    models.ModelPricing:
      type: object
      properties:
        context_limit:
          type: integer
        currency:
          type: string
        effective_from:
          type: string
        effective_to:
          type: string
        fetched_at:
          type: string
        host:
          type: string
        id:
          type: string
        modalities_input:
          type: array
          items:
            type: string
        modalities_output:
          type: array
          items:
            type: string
        model:
          type: string
        model_id:
          type: string
        open_weights:
          type: boolean
        output_limit:
          type: integer
        provider:
          type: string
        publisher:
          type: string
        raw_pricing_data:
          $ref: '#/components/schemas/datatypes.JSON'
        reasoning:
          type: boolean
        region:
          type: string
        sku_price_id:
          type: string
        source:
          type: string
        source_url:
          type: string
        structured_output:
          type: boolean
        tags:
          $ref: '#/components/schemas/datatypes.JSON'
        token_bucket:
          type: string
        tool_call:
          type: boolean
        unit_price_per_mtok:
          type: number
    github_com_baselinehq_pricingapi_pkg_types.Status:
      type: string
      enum:
        - Registered
        - Deleted
      x-enum-varnames:
        - Registered
        - Deleted
    datatypes.JSON:
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: API key with "bl_" prefix (e.g. "bl_<api_key>")
      name: X-API-Key
      in: header
    BearerAuth:
      type: apiKey
      description: Bearer token for authentication (e.g. "Bearer <token>")
      name: Authorization
      in: header

````