Skip to main content
GET
/
v1
/
countries
List of countries
curl --request GET \
  --url https://api.cloro.dev/v1/countries \
  --header 'Authorization: Bearer <token>'
[
  "AF",
  "AX",
  "AL",
  "DZ",
  "AS"
]

Overview

The Countries endpoint returns a list of all supported ISO 3166-1 alpha-2 country codes that can be used with the monitoring API. This endpoint provides the complete list of supported countries and territories, and can be filtered by model to get countries available for specific AI providers.

Request parameters

Required Parameters

None - this endpoint accepts a simple GET request.

Optional Parameters

ParameterTypeDescriptionExample
modelstringFilter countries available for a specific AI model. If not provided, returns all supported countries.chatgpt
Available model values:
  • aimode
  • aioverview
  • chatgpt
  • copilot
  • gemini
  • google
  • perplexity

Example usage

Basic Request

curl -X GET "https://api.cloro.dev/v1/countries" \
  -H "Authorization: Bearer sk_live_1234567890abcdef1234567890abcdef"

Filter by Model

curl -X GET "https://api.cloro.dev/v1/countries?model=chatgpt" \
  -H "Authorization: Bearer sk_live_1234567890abcdef1234567890abcdef"

Response schema

FieldTypeDescription
ResponsearrayArray of supported country codes in ISO 3166-1 alpha-2 format

Authentication

This endpoint requires authentication using a Bearer token in the Authorization header:
Authorization: Bearer sk_live_1234567890abcdef1234567890abcdef

Caching and Performance

PracticeRecommendationReason
Cache Duration24+ hoursCountry list rarely changes
ImplementationStore locally after first callReduces API calls and improves performance
ValidationUse for client-side country validationPrevents invalid country codes in monitor requests

Integration Guidelines

  1. Fetch once: Retrieve the country list when your application initializes
  2. Model-specific validation: Use the model parameter to get countries available for specific AI providers before sending monitor requests
  3. Handle updates: Implement a refresh mechanism for occasional updates
  4. Error handling: Have fallback behavior if the endpoint is temporarily unavailable
  5. Invalid models: Handle 400 errors when an invalid model parameter is provided

Model-specific Use Cases

  • Before monitoring: Call GET /v1/countries?model=chatgpt to get valid countries for ChatGPT monitoring
  • UI Country Selection: Populate dropdown menus with only countries available for the selected model
  • Validation: Validate user input against model-specific country lists before making monitor requests
  • Feature Discovery: Use different model values to discover which AI providers are available in which regions

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

model
enum<string>

Filter countries available for a specific AI model

Available options:
aimode,
aioverview,
chatgpt,
copilot,
gemini,
google,
perplexity

Response

List of supported country codes

Example:
["AF", "AX", "AL", "DZ", "AS"]