{"openapi":"3.1.0","info":{"title":"Compute Prices API","version":"1.0.0","summary":"Free public API for cloud GPU and LLM inference pricing.","description":"Latest prices, catalog, daily trends, and weekly movers across 20+ cloud GPU providers and LLM inference APIs. Public tier needs no signup (60 req/hr/IP). A free key lifts the limit to 5,000/hr and extends trend windows. See https://computeprices.com/docs/api for full reference.","contact":{"name":"ComputePrices API","email":"api@computeprices.com","url":"https://computeprices.com/docs/api"},"license":{"name":"Free to use with attribution","url":"https://computeprices.com/docs/api"}},"servers":[{"url":"https://computeprices.com","description":"Production"}],"externalDocs":{"description":"Full API documentation","url":"https://computeprices.com/docs/api"},"security":[{},{"ApiKey":[]}],"tags":[{"name":"Pricing","description":"Latest GPU and LLM inference prices."},{"name":"Catalog","description":"GPU models, LLM models, and providers."},{"name":"Trends","description":"Daily price history."},{"name":"Movers","description":"Largest week-over-week price changes."}],"paths":{"/api/v1/gpu-prices":{"get":{"tags":["Pricing"],"operationId":"listGpuPrices","summary":"Latest GPU prices","description":"Latest hourly USD price per provider × GPU × pricing_type × node size. One row per combination.","parameters":[{"$ref":"#/components/parameters/ProviderFilter"},{"name":"gpu","in":"query","description":"Filter to a single GPU model slug (e.g. `h100`, `a100-80gb`).","required":false,"schema":{"type":"string"}},{"name":"pricing_type","in":"query","description":"Filter by pricing model.","required":false,"schema":{"type":"string","enum":["on_demand","spot"]}}],"responses":{"200":{"description":"List of GPU prices.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GpuPrice"}},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/llm-prices":{"get":{"tags":["Pricing"],"operationId":"listLlmPrices","summary":"Latest LLM inference prices","description":"Latest per-1M-token input/output prices per provider × model × pricing_type. Non-token pricing (image, audio, video) is excluded in v1.","parameters":[{"$ref":"#/components/parameters/ProviderFilter"},{"name":"model","in":"query","description":"Filter to a single model slug (e.g. `claude-3-5-sonnet`, `gpt-4o`).","required":false,"schema":{"type":"string"}},{"name":"pricing_type","in":"query","description":"Filter by pricing model.","required":false,"schema":{"type":"string","enum":["standard","batch"]}}],"responses":{"200":{"description":"List of LLM prices.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LlmPrice"}},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/gpus":{"get":{"tags":["Catalog"],"operationId":"listGpuModels","summary":"List GPU models","description":"All tracked GPU models with specs (VRAM, architecture, TFLOPs, memory bandwidth).","responses":{"200":{"description":"List of GPU models.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GpuModel"}},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/gpus/{slug}":{"get":{"tags":["Catalog"],"operationId":"getGpuModel","summary":"Get a GPU model","parameters":[{"$ref":"#/components/parameters/SlugPath"}],"responses":{"200":{"description":"Single GPU model.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GpuModel"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/llm-models":{"get":{"tags":["Catalog"],"operationId":"listLlmModels","summary":"List LLM models","description":"All tracked LLM models with creator, context window, modalities, and knowledge cutoff.","responses":{"200":{"description":"List of LLM models.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LlmModel"}},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/llm-models/{slug}":{"get":{"tags":["Catalog"],"operationId":"getLlmModel","summary":"Get an LLM model","parameters":[{"$ref":"#/components/parameters/SlugPath"}],"responses":{"200":{"description":"Single LLM model.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LlmModel"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/providers":{"get":{"tags":["Catalog"],"operationId":"listProviders","summary":"List providers","description":"All tracked cloud GPU and inference-API providers. Archived providers are excluded.","responses":{"200":{"description":"List of providers.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/providers/{slug}":{"get":{"tags":["Catalog"],"operationId":"getProvider","summary":"Get a provider","parameters":[{"$ref":"#/components/parameters/SlugPath"}],"responses":{"200":{"description":"Single provider.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Provider"},"meta":{"$ref":"#/components/schemas/Meta"}},"required":["data","meta"]}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/trends/gpu/{slug}":{"get":{"tags":["Trends"],"operationId":"getGpuTrend","summary":"Daily GPU price trend","description":"Daily average hourly USD price for a GPU, across all providers offering it. `days` is capped per tier: public=7, free=30, pro=90, enterprise=365.","parameters":[{"$ref":"#/components/parameters/SlugPath"},{"name":"days","in":"query","description":"Days of history. Clamped to your tier cap.","required":false,"schema":{"type":"integer","minimum":1,"maximum":365}}],"responses":{"200":{"description":"Daily trend points.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GpuTrendPoint"}},"meta":{"$ref":"#/components/schemas/TrendMeta"}},"required":["data","meta"]}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/trends/llm/{slug}":{"get":{"tags":["Trends"],"operationId":"getLlmTrend","summary":"Daily LLM price trend","description":"Daily average per-1M-token input/output prices for an LLM model. `days` is capped per tier: public=7, free=30, pro=90, enterprise=365.","parameters":[{"$ref":"#/components/parameters/SlugPath"},{"name":"days","in":"query","description":"Days of history. Clamped to your tier cap.","required":false,"schema":{"type":"integer","minimum":1,"maximum":365}}],"responses":{"200":{"description":"Daily trend points.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LlmTrendPoint"}},"meta":{"$ref":"#/components/schemas/TrendMeta"}},"required":["data","meta"]}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/movers":{"get":{"tags":["Movers"],"operationId":"listMovers","summary":"Biggest week-over-week price changes","description":"Largest absolute and percent week-over-week price changes (up or down) per (provider, GPU/LLM). Filtered to changes between 2% and 500% to suppress noise.","parameters":[{"name":"scope","in":"query","description":"Which price universe to query.","required":true,"schema":{"type":"string","enum":["gpu","llm"]}},{"name":"limit","in":"query","description":"Max results.","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10}}],"responses":{"200":{"description":"List of movers. Shape depends on `scope`.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/GpuMover"},{"$ref":"#/components/schemas/LlmMover"}]}},"meta":{"$ref":"#/components/schemas/MoversMeta"}},"required":["data","meta"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"cp_live_...","description":"Optional. Bearer token from a `cp_live_...` API key. Unauthenticated requests use the public tier (60 req/hr/IP, 7-day trend window). Request a free key at api@computeprices.com — 5,000 req/hr, 30-day trends."}},"parameters":{"ProviderFilter":{"name":"provider","in":"query","description":"Filter by provider slug (e.g. `lambda`, `runpod`, `coreweave`).","required":false,"schema":{"type":"string"}},"SlugPath":{"name":"slug","in":"path","description":"URL-friendly identifier of the resource.","required":true,"schema":{"type":"string"}}},"schemas":{"Meta":{"type":"object","description":"Standard response metadata. Present on every response.","properties":{"count":{"type":"integer","description":"Number of items in `data` (collection endpoints only)."},"generated_at":{"type":"string","format":"date-time"},"version":{"type":"string","enum":["v1"]},"tier":{"type":"string","enum":["public","free","pro","enterprise"]},"rate_limit":{"$ref":"#/components/schemas/RateLimit"},"upgrade_hint":{"type":"string","description":"Plain-language hint naming the next-tier features. Present when relevant."}},"required":["generated_at","version","tier"]},"TrendMeta":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object","properties":{"days_requested":{"type":"integer"},"days_returned":{"type":"integer"},"tier_cap_days":{"type":"integer","description":"Maximum `days` allowed for the caller's tier."}}}]},"MoversMeta":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object","properties":{"scope":{"type":"string","enum":["gpu","llm"]},"window":{"type":"string","enum":["weekly"]}}}]},"RateLimit":{"type":"object","properties":{"limit":{"type":"integer"},"remaining":{"type":"integer"},"reset":{"type":"integer","description":"Unix epoch seconds when the window resets."},"window_seconds":{"type":"integer"}},"required":["limit","remaining","reset","window_seconds"]},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"slug":{"type":"string","description":"Echoed slug for 404 responses."}},"required":["error"]},"GpuPrice":{"type":"object","properties":{"provider":{"type":"string"},"provider_slug":{"type":"string"},"provider_url":{"type":["string","null"],"format":"uri"},"gpu":{"type":"string"},"gpu_slug":{"type":["string","null"]},"vram_gb":{"type":["number","null"]},"architecture":{"type":["string","null"]},"gpu_count":{"type":"integer","description":"GPUs per instance."},"max_gpus_per_node":{"type":"integer"},"price_per_hour_usd":{"type":["number","null"],"description":"Per-GPU hourly USD."},"total_hourly_usd":{"type":["number","null"],"description":"`price_per_hour_usd × gpu_count`."},"pricing_type":{"type":"string","enum":["on_demand","spot"]},"commitment_months":{"type":["integer","null"]},"currency":{"type":"string","description":"Source currency code."},"exchange_rate_to_usd":{"type":"number"},"source_url":{"type":["string","null"],"format":"uri"},"last_updated":{"type":"string","format":"date-time"}},"required":["provider","provider_slug","gpu","gpu_count","max_gpus_per_node","pricing_type","currency","exchange_rate_to_usd","last_updated"]},"LlmPrice":{"type":"object","properties":{"provider":{"type":["string","null"]},"provider_slug":{"type":["string","null"]},"provider_url":{"type":["string","null"],"format":"uri"},"model":{"type":"string"},"model_slug":{"type":["string","null"]},"creator":{"type":["string","null"]},"context_window":{"type":["integer","null"]},"modalities":{"type":"array","items":{"type":"string","enum":["text","image","video","audio"]}},"knowledge_cutoff":{"type":["string","null"],"format":"date"},"price_per_1m_input_usd":{"type":["number","null"]},"price_per_1m_output_usd":{"type":["number","null"]},"price_per_1m_cached_input_usd":{"type":["number","null"]},"pricing_type":{"type":"string","enum":["standard","batch"]},"source_url":{"type":["string","null"],"format":"uri"},"last_updated":{"type":"string","format":"date-time"}},"required":["model","modalities","pricing_type","last_updated"]},"GpuModel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":["string","null"]},"manufacturer":{"type":["string","null"]},"architecture":{"type":["string","null"]},"vram_gb":{"type":["number","null"]},"performance_tier":{"type":["string","null"],"enum":["entry","mid","high","ultra",null]},"generation":{"type":["integer","null"]},"server_gpu":{"type":["boolean","null"]},"cloud_compatible":{"type":["boolean","null"]},"release_date":{"type":["string","null"],"format":"date"},"end_of_life_date":{"type":["string","null"],"format":"date"},"msrp_usd":{"type":["number","null"]},"use_case":{"type":["string","null"]},"image_url":{"type":["string","null"],"format":"uri"},"specs":{"type":"object","properties":{"cuda_cores":{"type":["integer","null"]},"tensor_cores":{"type":["integer","null"]},"rt_cores":{"type":["integer","null"]},"compute_units":{"type":["integer","null"]},"memory_type":{"type":["string","null"]},"memory_bandwidth_gbps":{"type":["number","null"]},"memory_interface_bit":{"type":["integer","null"]},"manufacturing_process_nm":{"type":["integer","null"]},"tdp_watt":{"type":["integer","null"]},"max_power_watt":{"type":["integer","null"]},"fp16_tflops":{"type":["number","null"]},"fp32_tflops":{"type":["number","null"]},"fp64_tflops":{"type":["number","null"]},"int8_tops":{"type":["number","null"]}}}},"required":["id","name"]},"LlmModel":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":["string","null"]},"creator":{"type":["string","null"]},"family":{"type":["string","null"]},"context_window":{"type":["integer","null"]},"modalities":{"type":"array","items":{"type":"string","enum":["text","image","video","audio"]}},"knowledge_cutoff":{"type":["string","null"],"format":"date"}},"required":["id","name","modalities"]},"Provider":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":["string","null"]},"website":{"type":["string","null"],"format":"uri"},"description":{"type":["string","null"]},"tagline":{"type":["string","null"]},"category":{"type":["string","null"]},"hq_country":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"offerings":{"type":"object","properties":{"gpu":{"type":"boolean"},"llm":{"type":"boolean"}},"required":["gpu","llm"]},"docs_url":{"type":["string","null"],"format":"uri"},"pricing_url":{"type":["string","null"],"format":"uri"}},"required":["id","name","offerings"]},"GpuTrendPoint":{"type":"object","properties":{"day":{"type":"string","format":"date"},"avg_price_per_hour_usd":{"type":"number"},"provider_count":{"type":"integer"}},"required":["day","avg_price_per_hour_usd","provider_count"]},"LlmTrendPoint":{"type":"object","properties":{"day":{"type":"string","format":"date"},"avg_price_per_1m_input_usd":{"type":["number","null"]},"avg_price_per_1m_output_usd":{"type":["number","null"]},"provider_count":{"type":"integer"}},"required":["day","provider_count"]},"GpuMover":{"type":"object","properties":{"gpu":{"type":"string"},"gpu_slug":{"type":["string","null"]},"provider":{"type":"string"},"provider_slug":{"type":"string"},"current_price_per_hour_usd":{"type":"number"},"previous_price_per_hour_usd":{"type":"number"},"price_change_usd":{"type":"number"},"percent_change":{"type":"number"},"current_price_date":{"type":"string","format":"date-time"},"previous_price_date":{"type":"string","format":"date-time"}},"required":["gpu","provider","provider_slug","current_price_per_hour_usd","previous_price_per_hour_usd","price_change_usd","percent_change","current_price_date","previous_price_date"]},"LlmMover":{"type":"object","properties":{"model":{"type":"string"},"model_slug":{"type":["string","null"]},"provider":{"type":"string"},"provider_slug":{"type":"string"},"current_input_price_per_1m_usd":{"type":"number"},"current_output_price_per_1m_usd":{"type":"number"},"previous_input_price_per_1m_usd":{"type":"number"},"previous_output_price_per_1m_usd":{"type":"number"},"percent_change":{"type":"number"},"current_price_date":{"type":"string","format":"date-time"},"previous_price_date":{"type":"string","format":"date-time"}},"required":["model","provider","provider_slug","current_input_price_per_1m_usd","current_output_price_per_1m_usd","previous_input_price_per_1m_usd","previous_output_price_per_1m_usd","percent_change","current_price_date","previous_price_date"]}},"responses":{"Unauthorized":{"description":"Malformed `Authorization` header or invalid/revoked API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Unknown slug.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Rate limit exceeded for this tier. Wait `Retry-After` seconds. Response carries `X-RateLimit-*` and `Retry-After` headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until the rate-limit window resets.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix epoch seconds."}}},"BadRequest":{"description":"Invalid query parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}