---
title: "Get Optimal Base Region"
method: GET
path: "/regions/optimal"
tags: ["Regions"]
---

# Get Optimal Base Region

`GET /regions/optimal`

## Request

- Base URL: `https://api.bunny.net/mc`
- URL: `https://api.bunny.net/mc/regions/optimal`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/magic-containers-api/docs/regions/optimal/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the optimal base region for deployment based on the user's CDN server token location. Optionally filter by GPU type and required GPU count.

## Query parameters

- `cdnServerToken` string
- `gpuType` string
- `gpuCount` integer

## Response `200`

Optimal base region was successfully retrieved.

- OptimalBaseRegionResponse
  - `region` Region: Region model
    - `id` string
    - `name` string
    - `group` string
    - `hasAnycastSupport` boolean
    - `hasCapacity` boolean
    - `gpuTypes` string[]

## Other responses

- `401`: User is unauthorized.
- `500`: Unexpected server error.

## Changes

- **2026-11-12** `7bb58a0591b0`: 3 info
  - added the new optional `query` request parameter `gpuCount`
  - added the new optional `query` request parameter `gpuType`
  - added the optional property `region/gpuTypes` to the response with the `200` status
- **2026-04-26** `62fb48c758fb`: 2 info
  - added the optional property `id` to the response with the `500` status
  - the response property `errors/items/message` became required for the status `500`

[Operation history](https://skmtc.dev/bunny/apis/magic-containers-api/changes/regions/optimal/get.md)

---

[API](https://skmtc.dev/bunny/apis/magic-containers-api.md) - [All operations](https://skmtc.dev/bunny/apis/magic-containers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/magic-containers-api/revisions/7bb58a0591b0?raw)
