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

# Price a volume

> Resolve the rate CostGraph would bill for a block volume of the given type and capacity, in the given region.
Prices you have published for the volume's provider are preferred over the public catalogue.



## OpenAPI

````yaml https://raw.githubusercontent.com/baselinehq/mintlify-docs/main/api-reference/openapi.json post /v1/pricing/disks
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/pricing/disks:
    post:
      tags:
        - pricing
      summary: Price a volume
      description: >-
        Resolve the rate CostGraph would bill for a block volume of the given
        type and capacity, in the given region.

        Prices you have published for the volume's provider are preferred over
        the public catalogue.
      requestBody:
        description: Volume to price
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Disk'
        required: true
      responses:
        '200':
          description: The resolved price
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiskPrice'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: No price matches the volume
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '422':
          description: Validation failed
          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:
    Disk:
      type: object
      properties:
        availability_zone:
          type: string
        capacity_gb:
          type: number
        fallback_to_base_pricing:
          type: boolean
        id:
          type: string
        iops:
          type: number
        provider:
          $ref: >-
            #/components/schemas/github_com_baselinehq_golang-shared_types.Provider
        region:
          type: string
        service:
          $ref: '#/components/schemas/types.Service'
        throughput_mbps:
          type: number
        type:
          type: string
        usage_type:
          $ref: >-
            #/components/schemas/github_com_baselinehq_golang-shared_types.UsageType
    DiskPrice:
      type: object
      properties:
        availability_zone:
          type: string
        cost_per_gb_hour:
          type: number
        cost_per_iops_hour:
          type: number
        cost_per_throughput_mbps_hour:
          type: number
        created_at:
          type: string
        currency:
          type: string
        id:
          type: string
        max_capacity_gb:
          type: number
        max_iops:
          type: number
        max_throughput_mbps:
          type: number
        min_capacity_gb:
          type: number
        min_iops:
          type: number
        min_throughput_mbps:
          type: number
        native_cost_per_gb_hour:
          type: number
        native_cost_per_iops_hour:
          type: number
        native_cost_per_throughput_mbps_hour:
          type: number
        period_billing_hours:
          type: number
        provider:
          type: string
        raw_pricing_data:
          type: object
          properties: {}
        region:
          type: string
        service:
          type: string
        tags:
          type: object
          properties: {}
        type:
          type: string
        updated_at:
          type: string
        usage_type:
          type: string
    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
    github_com_baselinehq_golang-shared_types.Provider:
      type: string
      enum:
        - GCP
        - AWS
        - DigitalOcean
        - Azure
        - Hetzner
        - OVHCloud
        - PlanetScale
        - STACKIT
        - Akamai
        - Base
      x-enum-comments:
        Base: Base provider for default pricing, no specific cloud provider
      x-enum-descriptions:
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - ''
        - Base provider for default pricing, no specific cloud provider
      x-enum-varnames:
        - GCP
        - AWS
        - DigitalOcean
        - Azure
        - Hetzner
        - OVHCloud
        - PlanetScale
        - STACKIT
        - Akamai
        - Base
    types.Service:
      type: string
      enum:
        - ComputeEngine
        - AmazonEC2
        - Droplet
        - AzureCompute
        - AzureManagedDisks
        - HetznerCompute
        - OVHPublicCloud
        - BaseCompute
        - BaseDisks
        - AmazonEBS
        - AmazonRDS
        - AuroraDSQL
        - CloudSQL
        - AlloyDB
        - CloudSpanner
        - AzureDatabaseForPostgreSQL
        - AzureDatabaseForMySQL
        - AzureSQLDatabase
        - AzureSQLManagedInstance
        - PlanetScale
        - ComputeEnginePersistentDisk
        - STACKITCompute
        - STACKITBlockStorage
        - STACKITDatabase
        - AkamaiLinode
        - AkamaiBlockStorage
        - AkamaiDatabase
      x-enum-varnames:
        - ComputeEngine
        - AmazonEC2
        - Droplet
        - AzureCompute
        - AzureManagedDisks
        - HetznerCompute
        - OVHPublicCloud
        - BaseCompute
        - BaseDisks
        - AmazonEBS
        - AmazonRDS
        - AuroraDSQL
        - CloudSQL
        - AlloyDB
        - CloudSpanner
        - AzureDatabaseForPostgreSQL
        - AzureDatabaseForMySQL
        - AzureSQLDatabase
        - AzureSQLManagedInstance
        - PlanetScaleDB
        - ComputeEnginePersistentDisk
        - STACKITCompute
        - STACKITBlockStorage
        - STACKITDatabase
        - AkamaiLinode
        - AkamaiBlockStorage
        - AkamaiDatabase
    github_com_baselinehq_golang-shared_types.UsageType:
      type: string
      enum:
        - SPOT_PREEMPTIBLE
        - ONDEMAND
        - RESERVED
        - ONDEMAND_CUSTOM
        - SPOT_PREEMPTIBLE_CUSTOM
        - RESERVED_CUSTOM
        - SOLE_TENANCY
        - CUSTOM
        - EXTENDED
      x-enum-varnames:
        - SPOT_PREEMPTIBLE
        - ONDEMAND
        - RESERVED
        - ONDEMAND_CUSTOM
        - SPOT_PREEMPTIBLE_CUSTOM
        - RESERVED_CUSTOM
        - SOLE_TENANCY
        - CUSTOM
        - EXTENDED
    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

````