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

# Get pricing for an instance

> Get pricing for compute instances



## OpenAPI

````yaml https://raw.githubusercontent.com/baselinehq/mintlify-docs/main/api-reference/openapi.json post /pricing/compute
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:
  /pricing/compute:
    post:
      summary: Get pricing for an instance
      description: Get pricing for compute instances
      requestBody:
        description: Instance
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/github_com_baselinehq_golang-shared_types.Instance
        required: true
      responses:
        '200':
          description: Pricing for a given instance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/schema.ComputePricingsRow'
        '400':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
        '404':
          description: Pricing not found
          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:
    github_com_baselinehq_golang-shared_types.Instance:
      type: object
      properties:
        availability_zone:
          type: string
        fallback_to_base_pricing:
          type: boolean
        id:
          type: string
        instance_type:
          type: string
        operating_system:
          type: string
        provider:
          $ref: >-
            #/components/schemas/github_com_baselinehq_golang-shared_types.Provider
        region:
          type: string
        service:
          $ref: >-
            #/components/schemas/github_com_baselinehq_golang-shared_types.Service
        usage_type:
          $ref: >-
            #/components/schemas/github_com_baselinehq_golang-shared_types.UsageType
        vm:
          $ref: '#/components/schemas/github_com_baselinehq_golang-shared_types.VM'
    schema.ComputePricingsRow:
      type: object
      properties:
        architecture:
          type: string
        availability_zone:
          type: string
        cost_per_hour:
          type: number
        cpu_cores:
          type: number
        cpu_cores_cost_per_hour:
          type: number
        created_at:
          type: string
        id:
          type: string
        instance_type:
          type: string
        operating_system:
          type: string
        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
        tags:
          type: object
          properties: {}
        updated_at:
          type: string
        usage_type:
          type: string
    handler.ErrorResponse:
      type: object
      properties:
        error:
          type: string
    github_com_baselinehq_golang-shared_types.Provider:
      type: string
      enum:
        - GCP
        - AWS
        - DigitalOcean
        - Azure
        - Hetzner
        - OVHCloud
        - 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
        - Base
    github_com_baselinehq_golang-shared_types.Service:
      type: string
      enum:
        - ComputeEngine
        - AmazonEC2
        - Droplet
        - AzureCompute
        - AzureManagedDisks
        - HetznerCompute
        - OVHPublicCloud
        - BaseCompute
        - BaseDisks
        - AmazonEBS
        - ComputeEnginePersistentDisk
      x-enum-varnames:
        - ComputeEngine
        - AmazonEC2
        - Droplet
        - AzureCompute
        - AzureManagedDisks
        - HetznerCompute
        - OVHPublicCloud
        - BaseCompute
        - BaseDisks
        - AmazonEBS
        - ComputeEnginePersistentDisk
    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
    github_com_baselinehq_golang-shared_types.VM:
      type: object
      properties:
        cpu_cores:
          type: number
        ram_gb:
          type: number
  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

````