Skip to content
skyl

GET /v1/providers

The names of every registered provider.

Tells a client what it may ask for. Cheap — it reads the gateway's own configuration and makes no upstream call.

Reference#

GET /v1/providers

Requires Authorization: Bearer <SKYL_AUTH_TOKEN>. Returns application/json.

{"default": "anthropic", "providers": ["anthropic", "openai"]}
{"default": "anthropic", "providers": ["anthropic", "openai"]}
FieldMeaning
defaultThe provider used when a request omits one — SKYL_DEFAULT_PROVIDER, or the alphabetically first name.
providersEvery registered provider name, sorted.

Caveats

  • Names are sorted, so the output is stable across restarts.
  • default tells you which provider a request with no provider field will reach. Read it rather than assuming: it is the alphabetically first name unless an operator set SKYL_DEFAULT_PROVIDER.
  • The list reflects which API keys were present at startup. A provider is registered for each key found; there is no runtime registration.
  • No upstream call. Unlike /v1/models, this is free and safe to call often.

Usage#

Discovering what is available

curl -sS localhost:8080/v1/providers \
  -H "Authorization: Bearer $SKYL_AUTH_TOKEN"
curl -sS localhost:8080/v1/providers \
  -H "Authorization: Bearer $SKYL_AUTH_TOKEN"

A startup sanity check

# Fail a deploy if the provider you expect is not registered.
curl -sf localhost:8080/v1/providers -H "Authorization: Bearer $TOKEN" \
  | grep -q anthropic || { echo "anthropic not registered"; exit 1; }
# Fail a deploy if the provider you expect is not registered.
curl -sf localhost:8080/v1/providers -H "Authorization: Bearer $TOKEN" \
  | grep -q anthropic || { echo "anthropic not registered"; exit 1; }

A smoke test that also validates the token

# 200 proves the gateway is up AND the token is right — more than /healthz,
# which is unauthenticated by design.
curl -sf -o /dev/null -w '%{http_code}\n' localhost:8080/v1/providers \
  -H "Authorization: Bearer $TOKEN"
# 200 proves the gateway is up AND the token is right — more than /healthz,
# which is unauthenticated by design.
curl -sf -o /dev/null -w '%{http_code}\n' localhost:8080/v1/providers \
  -H "Authorization: Bearer $TOKEN"

Troubleshooting#

An empty list

Impossible — the gateway refuses to start with no providers registered. If you see one, you are not talking to a skyl gateway.

A provider I configured is missing

Its key was not present at startup. Variable names must match exactly: ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, and SKYL_COMPAT_BASE_URL for a compatible host.

The compatible provider is named “compat”

That is the default. Set SKYL_COMPAT_NAME.

Edit this page on GitHub