> ## 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.

# Publish model prices

> Register your own token rates for models you host, so CostGraph can price calls it has no public rate for.
Entries are versioned: a price change closes the current row and opens a new one, so spend already recorded 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.



## OpenAPI

````yaml https://raw.githubusercontent.com/baselinehq/mintlify-docs/main/api-reference/openapi.json post /v1/marketplace/models
openapi: 3.0.1
info:
  title: CostGraph Pricing API
  description: Provides API level access to the Costgraph Services.
  termsOfService: https://costgraph.ai/terms-of-use
  contact:
    name: Customer Support
    url: https://costgraph.ai/support
    email: support@costgraph.ai
  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:
  /v1/marketplace/models:
    post:
      tags:
        - marketplace
      summary: Publish model prices
      description: >-
        Register your own token rates for models you host, so CostGraph can
        price calls it has no public rate for.

        Entries are versioned: a price change closes the current row and opens a
        new one, so spend already recorded 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.
      requestBody:
        description: Prices to publish
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelPricesRequest'
        required: true
      responses:
        '201':
          description: The published prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishedModelPrices'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    ModelPricesRequest:
      required:
        - entries
      type: object
      properties:
        entries:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/ModelPrice'
    PublishedModelPrices:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelPrice'
    Problem:
      type: object
      properties:
        code:
          type: string
        detail:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
        instance:
          type: string
        status:
          type: integer
        title:
          type: string
        type:
          type: string
    ModelPrice:
      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
    FieldError:
      type: object
      properties:
        detail:
          type: string
        pointer:
          type: string
    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

````