> ## 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 database prices

> Register your own managed database rates so CostGraph can price clusters it has no public price for.
An entry is upserted on its natural key (provider, service, region, engine, edition, instance type and usage type), so re-posting the same entry with a new cost keeps its id and reprices everything already using it.
The returned id is what you attach to a database with the `costgraph.ai/pricing-id.database` label or tag.



## OpenAPI

````yaml https://raw.githubusercontent.com/baselinehq/mintlify-docs/main/api-reference/openapi.json post /v1/marketplace/databases
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/databases:
    post:
      tags:
        - marketplace
      summary: Publish database prices
      description: >-
        Register your own managed database rates so CostGraph can price clusters
        it has no public price for.

        An entry is upserted on its natural key (provider, service, region,
        engine, edition, instance type and usage type), so re-posting the same
        entry with a new cost keeps its id and reprices everything already using
        it.

        The returned id is what you attach to a database with the
        `costgraph.ai/pricing-id.database` label or tag.
      requestBody:
        description: Prices to publish
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatabasePricesRequest'
        required: true
      responses:
        '201':
          description: The published prices
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishedDatabasePrices'
        '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:
    DatabasePricesRequest:
      required:
        - entries
      type: object
      properties:
        entries:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/DatabasePrice'
    PublishedDatabasePrices:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DatabasePrice'
    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
    DatabasePrice:
      type: object
      properties:
        architecture:
          type: string
        availability_zone:
          type: string
        billing_config:
          type: string
        capacity_unit:
          type: string
        cost_per_capacity_unit:
          type: number
        cost_per_hour:
          type: number
        cost_per_io_request:
          type: number
        cost_per_iops_hour:
          type: number
        cost_per_storage_gb_hour:
          type: number
        cost_per_throughput_mbps_hour:
          type: number
        cost_per_vcpu_license_hour:
          type: number
        cpu_cores:
          type: number
        cpu_cores_cost_per_hour:
          type: number
        created_at:
          type: string
        currency:
          type: string
        deployment_option:
          type: string
        edition:
          type: string
        engine:
          type: string
        id:
          type: string
        instance_type:
          type: string
        max_iops:
          type: number
        max_storage_gb:
          type: number
        max_throughput_mbps:
          type: number
        min_iops:
          type: number
        min_storage_gb:
          type: number
        min_throughput_mbps:
          type: number
        native_cost_per_hour:
          type: number
        native_cost_per_storage_gb_hour:
          type: number
        period_billing_hours:
          type: number
        provider:
          type: string
        ram_gb:
          type: number
        ram_gb_cost_per_hour:
          type: number
        raw_pricing_data:
          type: object
          properties: {}
        region:
          type: string
        service:
          type: string
        storage_type:
          type: string
        tags:
          type: object
          properties: {}
        updated_at:
          type: string
        usage_type:
          type: string
    FieldError:
      type: object
      properties:
        detail:
          type: string
        pointer:
          type: string
  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

````