---
title: "List the models a provider offers for one of the machine's keys"
method: POST
path: "/api/nodes/{node_id}/ai-gateway/provider-models"
tags: ["nodes"]
---

# List the models a provider offers for one of the machine's keys

`POST /api/nodes/{node_id}/ai-gateway/provider-models`

## Request

- Base URL: `https://app.nerdit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://app.nerdit.ai/api/nodes/{node_id}/ai-gateway/provider-models`
- Auth: none declared

The daemon calls the provider with the named key; only model ids come back.

A POST under the mutation policy although nothing is stored: the daemon
sends the key to whatever host ``base_url`` names, so a cross-site GET
riding the session cookie could have it sent to an attacker's host.
CSRF, the write limit and standing apply as to a write. A daemon
without the route (before 0.8.5) answers 404, which passes through:
the console then asks for the model name instead.

## Path parameters

- `node_id` string, uuid, required

## Request body

- NodeAiProviderModelsRequest: Which key, and which provider, to list models for. The key is a **name**.
  - `key` string, required
  - `base_url` string, required

## Response `200`

Successful Response

- NodeAiProviderModelsView: The model ids one provider lists for one of the machine's keys.
  - `online` boolean, required
  - `models` string[], required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Content
- `429`: Too Many Requests
- `502`: Bad Gateway

---

[API](https://skmtc.dev/nerdit/apis/nerdit-cloud-web.md) · [All operations](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/llms.txt) · [OpenAPI document](https://skmtc.dev/nerdit/apis/nerdit-cloud-web/revisions/06e3b44b58be?raw)
