{
    "openapi": "3.1.0",
    "info": {
        "title": "CoreGPU inventory API",
        "version": "1.0.0",
        "summary": "Live stock and monthly prices of CoreGPU dedicated GPU servers.",
        "description": "Public and read-only: no key, CORS enabled, 60 requests per minute per IP. Prices are per GPU per month in USD; servers are rented with 1 to 8 GPUs and paid in BTC, ETH, XMR, USDT (TRC-20) or SOL.",
        "contact": {
            "name": "CoreGPU support",
            "url": "https://coregpu.io/contact"
        }
    },
    "servers": [
        {
            "url": "https://coregpu.io/api/v1"
        }
    ],
    "externalDocs": {
        "description": "Inventory API reference",
        "url": "https://coregpu.io/docs/api"
    },
    "paths": {
        "/gpus": {
            "get": {
                "operationId": "listGpus",
                "summary": "List every GPU with live stock and monthly price",
                "responses": {
                    "200": {
                        "description": "All GPUs",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GpuList"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/gpus/{slug}": {
            "get": {
                "operationId": "getGpu",
                "summary": "One GPU with live stock and monthly price",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "b300",
                                "b200",
                                "mi355x",
                                "mi350x",
                                "h200",
                                "mi325x",
                                "mi300x",
                                "h100",
                                "rtx-pro-6000",
                                "l40s"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The GPU",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Gpu"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Unknown slug",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string",
                                            "enum": [
                                                "not_found"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Gpu": {
                "type": "object",
                "required": [
                    "slug",
                    "name",
                    "vendor",
                    "memory_gb",
                    "status",
                    "available",
                    "price_month",
                    "currency",
                    "url"
                ],
                "properties": {
                    "slug": {
                        "type": "string",
                        "enum": [
                            "b300",
                            "b200",
                            "mi355x",
                            "mi350x",
                            "h200",
                            "mi325x",
                            "mi300x",
                            "h100",
                            "rtx-pro-6000",
                            "l40s"
                        ],
                        "examples": [
                            "h100"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "examples": [
                            "NVIDIA H100 SXM"
                        ]
                    },
                    "vendor": {
                        "type": "string",
                        "enum": [
                            "NVIDIA",
                            "AMD"
                        ]
                    },
                    "architecture": {
                        "type": "string",
                        "examples": [
                            "Hopper"
                        ]
                    },
                    "memory_gb": {
                        "type": "integer",
                        "description": "GPU memory per GPU, GB"
                    },
                    "memory_type": {
                        "type": "string",
                        "examples": [
                            "HBM3e"
                        ]
                    },
                    "bandwidth_tbs": {
                        "type": "number",
                        "description": "Memory bandwidth per GPU, TB/s"
                    },
                    "fp8_pflops_dense": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Dense FP8 Tensor throughput per GPU, PFLOPS"
                    },
                    "fp4_pflops_dense": {
                        "type": [
                            "number",
                            "null"
                        ],
                        "description": "Dense FP4 Tensor throughput per GPU, PFLOPS; null when not supported"
                    },
                    "interconnect": {
                        "type": "string",
                        "examples": [
                            "NVLink 4 · 900 GB/s"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "in_stock",
                            "low",
                            "sold_out",
                            "preorder"
                        ]
                    },
                    "available": {
                        "type": "integer",
                        "description": "GPUs free right now in the current allocation"
                    },
                    "allocation_size": {
                        "type": "integer",
                        "description": "GPUs in the current allocation"
                    },
                    "max_per_server": {
                        "type": "integer",
                        "description": "Largest server that can be ordered now (1 to 8 GPUs)"
                    },
                    "price_month": {
                        "type": "integer",
                        "description": "Price per GPU per month, USD, taxes excluded; the same at every server size"
                    },
                    "market_month": {
                        "type": "integer",
                        "description": "Market median: public on-demand price of specialist GPU clouds x 730 hours, USD"
                    },
                    "currency": {
                        "type": "string",
                        "enum": [
                            "USD"
                        ]
                    },
                    "restock_on": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date",
                        "description": "Date of the next allocation, when one is scheduled"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    }
                }
            },
            "GpuList": {
                "type": "object",
                "properties": {
                    "object": {
                        "type": "string",
                        "enum": [
                            "list"
                        ]
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "data": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Gpu"
                        }
                    }
                }
            }
        }
    }
}