{ "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/" } ], "paths": { "/marketplace/providers/compute": { "get": { "summary": "Get your custom pricing entries", "description": "List the compute rates your organization has registered. Only your own rates are returned, never another organization's.\nFilters combine, and paging is by limit and offset.", "parameters": [ { "name": "limit", "in": "query", "description": "Maximum entries to return (default 500)", "schema": { "type": "integer" } }, { "name": "offset", "in": "query", "description": "Entries to skip", "schema": { "type": "integer" } }, { "name": "service", "in": "query", "description": "Filter by service", "schema": { "type": "string" } }, { "name": "region", "in": "query", "description": "Filter by region", "schema": { "type": "string" } }, { "name": "instance_type", "in": "query", "description": "Filter by instance type", "schema": { "type": "string" } }, { "name": "usage_type", "in": "query", "description": "Filter by usage type", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for custom pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.MarketplaceProvidersResponse" } } } }, "401": { "description": "Unauthorized", "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": [] } ] }, "post": { "summary": "Register a custom provider", "description": "Register your own compute rates so CostGraph can price machines it has no public price for, such as bare metal or a private cloud.\nAn entry is upserted on its natural key (provider, service, region, availability zone, usage type, instance type, operating system and period billing hours), so re-posting the same entry with a new cost keeps its id and reprices everything already using it. Changing any key field mints a new id, because it describes a different SKU.\nThe returned id is what you attach to a resource with the `costgraph.ai/pricing-id.compute` label or tag. Treat it as a secret you hand out deliberately: anyone holding it can pin to the rate, which is how a provider prices clusters it sells on.", "requestBody": { "description": "Custom pricing request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomPriceRequest" } } }, "required": true }, "responses": { "200": { "description": "Pricing response for a custom provider", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomPricingResponse" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "401": { "description": "Provider 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": [] } ], "x-codegen-request-body-name": "instance" }, "delete": { "summary": "Delete a custom provider instance", "description": "Delete one of your compute rates by id.\nResources still pinned to it stop resolving a price rather than falling back to attribute matching, so re-pin them before deleting.", "parameters": [ { "name": "id", "in": "query", "description": "Instance ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for a custom provider", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomPricingResponse" } } } }, "400": { "description": "Invalid id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "401": { "description": "Provider and organization do not match", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "404": { "description": "Instance 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": [] } ] } }, "/marketplace/providers/databases": { "get": { "summary": "Get your custom database pricing entries", "description": "List the managed database rates your organization has registered. Only your own rates are returned.\nFilters combine, and paging is by limit and offset.", "parameters": [ { "name": "limit", "in": "query", "description": "Maximum entries to return (default 500)", "schema": { "type": "integer" } }, { "name": "offset", "in": "query", "description": "Entries to skip", "schema": { "type": "integer" } }, { "name": "service", "in": "query", "description": "Filter by service", "schema": { "type": "string" } }, { "name": "region", "in": "query", "description": "Filter by region", "schema": { "type": "string" } }, { "name": "engine", "in": "query", "description": "Filter by engine", "schema": { "type": "string" } }, { "name": "edition", "in": "query", "description": "Filter by edition", "schema": { "type": "string" } }, { "name": "instance_type", "in": "query", "description": "Filter by instance type", "schema": { "type": "string" } }, { "name": "usage_type", "in": "query", "description": "Filter by usage type", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for custom database pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.MarketplaceDatabaseProvidersResponse" } } } }, "401": { "description": "Unauthorized", "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": [] } ] }, "post": { "summary": "Register custom database pricing", "description": "Register your own managed database rates, keyed by engine, edition, deployment option, storage type and instance type alongside the usual provider, service and region.\nAn entry is upserted on that full natural key, so re-posting with a new cost keeps its id; changing any key field mints a new one.\nThe returned id is what you attach with the `costgraph.ai/pricing-id.database` label or tag.", "requestBody": { "description": "Custom database pricing request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomDatabasePriceRequest" } } }, "required": true }, "responses": { "200": { "description": "Pricing response for custom database pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomDatabasePricingResponse" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "401": { "description": "Provider 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": [] } ], "x-codegen-request-body-name": "instance" }, "delete": { "summary": "Delete a custom database pricing entry", "description": "Delete one of your managed database rates by id.\nDatabases still pinned to it stop resolving a price, so re-pin them before deleting.", "parameters": [ { "name": "id", "in": "query", "description": "Database pricing ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for custom database pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomDatabasePricingResponse" } } } }, "400": { "description": "Invalid id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "401": { "description": "Provider and organization do not match", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "404": { "description": "Database pricing entry 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": [] } ] } }, "/marketplace/providers/disks": { "get": { "summary": "Get your custom disk pricing entries", "description": "List the storage rates your organization has registered. Only your own rates are returned.\nFilters combine, and paging is by limit and offset.", "parameters": [ { "name": "limit", "in": "query", "description": "Maximum entries to return (default 500)", "schema": { "type": "integer" } }, { "name": "offset", "in": "query", "description": "Entries to skip", "schema": { "type": "integer" } }, { "name": "service", "in": "query", "description": "Filter by service", "schema": { "type": "string" } }, { "name": "region", "in": "query", "description": "Filter by region", "schema": { "type": "string" } }, { "name": "type", "in": "query", "description": "Filter by disk type", "schema": { "type": "string" } }, { "name": "usage_type", "in": "query", "description": "Filter by usage type", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for custom disk pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.MarketplaceDiskProvidersResponse" } } } }, "401": { "description": "Unauthorized", "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": [] } ] }, "post": { "summary": "Register a custom disk provider", "description": "Register your own storage rates, priced per GB hour with optional IOPS and throughput components and the capacity band they apply to.\nAn entry is upserted on its natural key (provider, service, region, availability zone, disk type, usage type and period billing hours), so re-posting with a new cost keeps its id; changing a key field mints a new one.\nThe returned id is what you attach with the `costgraph.ai/pricing-id.storage` label or tag.", "requestBody": { "description": "Custom disk pricing request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomDiskPriceRequest" } } }, "required": true }, "responses": { "200": { "description": "Pricing response for a custom disk provider", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomDiskPricingResponse" } } } }, "400": { "description": "Invalid request body", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "401": { "description": "Provider 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": [] } ], "x-codegen-request-body-name": "instance" }, "delete": { "summary": "Delete a custom disk provider entry", "description": "Delete one of your storage rates by id.\nVolumes still pinned to it stop resolving a price, so re-pin them before deleting.", "parameters": [ { "name": "id", "in": "query", "description": "Disk pricing ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for a custom disk provider", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.CustomDiskPricingResponse" } } } }, "400": { "description": "Invalid id", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "401": { "description": "Provider and organization do not match", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } }, "404": { "description": "Disk pricing entry 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": [] } ] } }, "/marketplace/providers/models": { "get": { "summary": "Get your custom model pricing entries", "description": "List the live version of each model rate your organization has registered. Only your own rates are returned.\nFilters combine, and paging is by limit and offset.", "parameters": [ { "name": "limit", "in": "query", "description": "Maximum entries to return (default 500)", "schema": { "type": "integer" } }, { "name": "offset", "in": "query", "description": "Entries to skip", "schema": { "type": "integer" } }, { "name": "model", "in": "query", "description": "Filter by model", "schema": { "type": "string" } }, { "name": "provider", "in": "query", "description": "Filter by model provider", "schema": { "type": "string" } }, { "name": "region", "in": "query", "description": "Filter by region", "schema": { "type": "string" } }, { "name": "token_bucket", "in": "query", "description": "Filter by token bucket", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for custom model pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.MarketplaceModelProvidersResponse" } } } }, "401": { "description": "Unauthorized", "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": [] } ] }, "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.\nThe returned id is what you attach with the `costgraph.ai/pricing-id.model` label or tag.", "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": [] } ], "x-codegen-request-body-name": "instance" }, "delete": { "summary": "Delete a custom model pricing entry", "description": "Delete one of your model rates by id.\nUsage still pinned to it stops resolving a price, so re-pin before deleting.", "parameters": [ { "name": "id", "in": "query", "description": "Model pricing ID", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Pricing response for custom model pricing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.CustomModelPricingResponse" } } } }, "400": { "description": "Invalid id", "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" } } } }, "404": { "description": "Model pricing entry 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": [] } ] } }, "/pricing": { "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": [] } ], "x-codegen-request-body-name": "instance" } }, "/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": [] } ], "x-codegen-request-body-name": "instance" } }, "/pricing/disks": { "post": { "summary": "Get pricing for a disk", "description": "Get pricing for a disk", "requestBody": { "description": "Disk", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.Disk" } } }, "required": true }, "responses": { "200": { "description": "Pricing for a given disk", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/schema.DiskPricingsRow" } } } }, "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": [] } ], "x-codegen-request-body-name": "instance" } }, "/providers": { "get": { "summary": "Get details for the providers", "description": "Get details for the providers", "responses": { "200": { "description": "List of providers", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/provider.Configs" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/handler.ErrorResponse" } } } } }, "security": [ { "ApiKeyAuth": [] }, { "BearerAuth": [] } ] } }, "/recommendations": { "post": { "summary": "Get recommendations for compute instances", "description": "Get the cheapest compute candidate per provider with savings versus the requested instance", "requestBody": { "description": "Instance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.ComputeRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/recommendations.ComputeRecommendationResult" } } } } }, "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": "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": [] } ], "x-codegen-request-body-name": "instance" } }, "/recommendations/compute": { "post": { "summary": "Get recommendations for compute instances", "description": "Get the cheapest compute candidate per provider with savings versus the requested instance", "requestBody": { "description": "Instance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.ComputeRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/recommendations.ComputeRecommendationResult" } } } } }, "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": "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": [] } ], "x-codegen-request-body-name": "instance" } }, "/recommendations/disks": { "post": { "summary": "Get recommendations for disks", "description": "Get the cheapest disk candidate per provider with savings versus the requested disk", "requestBody": { "description": "Instance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/types.DiskRequest" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/recommendations.DiskRecommendationResult" } } } } }, "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": "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": [] } ], "x-codegen-request-body-name": "instance" } } }, "components": { "schemas": { "datatypes.JSON": { "type": "object" }, "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/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" } } }, "github_com_baselinehq_golang-shared_types.Provider": { "type": "string", "enum": [ "GCP", "AWS", "DigitalOcean", "Azure", "Hetzner", "OVHCloud", "PlanetScale", "STACKIT", "Base" ], "x-enum-comments": { "Base": "Base provider for default pricing, no specific cloud provider" }, "x-enum-varnames": [ "GCP", "AWS", "DigitalOcean", "Azure", "Hetzner", "OVHCloud", "PlanetScale", "STACKIT", "Base" ] }, "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" } } }, "github_com_baselinehq_pricingapi_pkg_types.Status": { "type": "string", "enum": [ "Registered", "Deleted" ], "x-enum-varnames": [ "Registered", "Deleted" ] }, "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" } } }, "handler.MarketplaceModelProvidersResponse": { "type": "object", "properties": { "providers": { "type": "array", "items": { "$ref": "#/components/schemas/models.ModelPricing" } } } }, "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" } } }, "provider.Config": { "type": "object", "properties": { "predicates": { "$ref": "#/components/schemas/types.Predicates" }, "provider": { "$ref": "#/components/schemas/github_com_baselinehq_golang-shared_types.Provider" } } }, "provider.Configs": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/provider.Config" } }, "recommendations.ComputeRecommendationResult": { "type": "object", "properties": { "pricing": { "$ref": "#/components/schemas/schema.ComputePricingsRow" }, "savings": { "$ref": "#/components/schemas/types.Savings" } } }, "recommendations.DiskRecommendationResult": { "type": "object", "properties": { "pricing": { "$ref": "#/components/schemas/schema.DiskPricingsRow" }, "savings": { "$ref": "#/components/schemas/types.Savings" } } }, "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" }, "currency": { "type": "string" }, "gpu_cost_per_hour": { "type": "number" }, "gpu_count": { "type": "number" }, "gpu_type": { "type": "string" }, "id": { "type": "string" }, "instance_type": { "type": "string" }, "native_cost_per_hour": { "type": "number" }, "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" } } }, "schema.DatabasePricingsRow": { "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" } } }, "schema.DiskPricingsRow": { "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" } } }, "types.ComputeRequest": { "type": "object", "properties": { "include_metadata": { "type": "boolean" }, "instance": { "$ref": "#/components/schemas/github_com_baselinehq_golang-shared_types.Instance" }, "predicates": { "$ref": "#/components/schemas/types.Predicates" }, "usage": { "$ref": "#/components/schemas/github_com_baselinehq_golang-shared_types.VM" } } }, "types.CustomDatabasePriceRequest": { "required": [ "entries" ], "type": "object", "properties": { "entries": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/schema.DatabasePricingsRow" } } } }, "types.CustomDatabasePricingResponse": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/schema.DatabasePricingsRow" } }, "status": { "$ref": "#/components/schemas/github_com_baselinehq_pricingapi_pkg_types.Status" } } }, "types.CustomDiskPriceRequest": { "required": [ "entries" ], "type": "object", "properties": { "entries": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/schema.DiskPricingsRow" } } } }, "types.CustomDiskPricingResponse": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/schema.DiskPricingsRow" } }, "status": { "$ref": "#/components/schemas/github_com_baselinehq_pricingapi_pkg_types.Status" } } }, "types.CustomPriceRequest": { "required": [ "entries" ], "type": "object", "properties": { "entries": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/schema.ComputePricingsRow" } } } }, "types.CustomPricingResponse": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/schema.ComputePricingsRow" } }, "status": { "$ref": "#/components/schemas/github_com_baselinehq_pricingapi_pkg_types.Status" } } }, "types.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" } } }, "types.DiskRequest": { "type": "object", "properties": { "include_metadata": { "type": "boolean" }, "instance": { "$ref": "#/components/schemas/types.Disk" }, "predicates": { "$ref": "#/components/schemas/types.Predicates" }, "usage": { "$ref": "#/components/schemas/types.Disk" } } }, "types.MarketplaceDatabaseProvidersResponse": { "type": "object", "properties": { "providers": { "type": "array", "items": { "$ref": "#/components/schemas/schema.DatabasePricingsRow" } } } }, "types.MarketplaceDiskProvidersResponse": { "type": "object", "properties": { "providers": { "type": "array", "items": { "$ref": "#/components/schemas/schema.DiskPricingsRow" } } } }, "types.MarketplaceProvidersResponse": { "type": "object", "properties": { "providers": { "type": "array", "items": { "$ref": "#/components/schemas/schema.ComputePricingsRow" } } } }, "types.Predicates": { "type": "object", "properties": { "availability_zones": { "type": "array", "items": { "type": "string" } }, "disk_types": { "type": "array", "items": { "type": "string" } }, "instance_types": { "type": "array", "items": { "type": "string" } }, "operating_systems": { "type": "array", "items": { "type": "string" } }, "providers": { "type": "array", "items": { "type": "string" } }, "regions": { "type": "array", "items": { "type": "string" } }, "services": { "type": "array", "items": { "type": "string" } }, "usage_types": { "type": "array", "items": { "type": "string" } } } }, "types.Savings": { "type": "object", "properties": { "amount_per_hour": { "type": "number" }, "amount_per_month": { "type": "number" }, "amount_per_year": { "type": "number" }, "percentage": { "type": "number" } } }, "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" ], "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" ] } }, "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "description": "API key with \"bl_\" prefix (e.g. \"bl_\")", "name": "X-API-Key", "in": "header" }, "BearerAuth": { "type": "apiKey", "description": "Bearer token for authentication (e.g. \"Bearer \")", "name": "Authorization", "in": "header" } } }, "x-original-swagger-version": "2.0" }