Skip to content

Quick start

  1. Get an API key.

    Sign in to the AI4M dashboard and open Settings → API access. Choose Create API key, name it, and pick the data it may read. Copy the key when it is shown: it is displayed only once.

    In an organisation, only administrators can create keys. See Authentication.

  2. Check which months are available.

    curl https://api.ai4mproject.com/v1/periods \
    -H "Authorization: Bearer $AI4M_API_KEY"

    The response tells you the latest estimated month and the last forecast month:

    {
    "last_estimated": "2026-07",
    "last_forecast": "2026-11",
    "updated_at": "2026-10-04T00:54:14.000Z",
    "model_version": "ai4m-malaria-1.0"
    }
  3. Get risk scores for every state.

    curl https://api.ai4mproject.com/v1/risk/states \
    -H "Authorization: Bearer $AI4M_API_KEY"
  4. Drill into one state’s LGAs.

    States are identified by a two-letter code, such as KN for Kano. The full list is in States and LGA codes.

    curl "https://api.ai4mproject.com/v1/risk/lgas?state=KN" \
    -H "Authorization: Bearer $AI4M_API_KEY"