> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reqi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Flag PNG (default)

> 301 redirect to /flags/{code}.png on the API host (or hashed PNG when opaque=true).

301 redirect to /flags/{code}.png on the API host (or hashed PNG when opaque=true).


## OpenAPI

````yaml https://api.reqi.dev/openapi/flags.json GET /v1/flags/get/{code}
openapi: 3.1.0
info:
  title: Countries API — Flags
  version: 1.0.0
  description: >-
    PNG and SVG redirects under /v1/flags on API host; CDN at cdn.reqi.dev
    Subset of the full API contract at /openapi.json (3 paths).
servers:
  - url: https://api.reqi.dev
    description: API host
  - url: https://cdn.reqi.dev
    description: Flag CDN
security: []
tags:
  - name: Flags
    description: PNG and SVG redirects under /v1/flags on API host; CDN at cdn.reqi.dev
paths:
  /v1/flags/get/{code}:
    get:
      tags:
        - Flags
      summary: Flag PNG (default)
      description: >-
        301 redirect to /flags/{code}.png on the API host (or hashed PNG when
        opaque=true).
      operationId: getFlagPngDefault
      parameters:
        - name: code
          in: path
          required: true
          description: ISO 3166-1 alpha-2 code (case-insensitive).
          schema:
            type: string
        - name: opaque
          in: query
          description: >-
            If true or 1, redirect to an opaque content-hashed filename
            (/flags/{24-hex}.svg|png) for immutable caching. Default redirects
            use ISO codes (/flags/{code}.svg|png).
          schema:
            type: string
            enum:
              - 'true'
              - 'false'
              - '1'
              - '0'
      responses:
        '301':
          description: >-
            Redirect to /flags/{code}.png or .svg by default, or to
            /flags/{hash} when opaque=true.
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    NotFound:
      description: No matching country or flag asset.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
        status:
          type: integer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.