Skip to content
Get API key
On this page

Build with router.africa

One API for the best models. Point your OpenAI or Anthropic SDK at https://api.router.africa/v1, add your key, and keep your code as it is.

Switching takes one line

router.africa speaks the OpenAI and Anthropic wire formats. Change the base URL and the key; everything else in your app stays the same.

from openai import OpenAI
import os

client = OpenAI(
  base_url="https://api.router.africa/v1",  # the only change
  api_key=os.environ["ROUTER_AFRICA_API_KEY"],
)