---
title: "Fetch the catalog now, store it and apply its prices. On failure the previous catalog stays in use and the reason is recorded in the status."
method: POST
path: "/ai/model-catalog/refresh"
tags: ["AI Gateway Model Catalog"]
---

# Fetch the catalog now, store it and apply its prices. On failure the previous catalog stays in use and the reason is recorded in the status.

`POST /ai/model-catalog/refresh`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/model-catalog/refresh`
- Auth: HTTP bearer

## Response `200`

Catalog refreshed

- ModelCatalogRefreshResult: What a successful refresh stored.
  - `applied_prices` integer, required: Prices applied over the bundled table.
  - `skipped` integer, required: Entries rejected as invalid.
  - `status` ModelCatalogStatus, required: The catalog's settings and the outcome of its last refresh.
    - `applied_price_count` integer, required: Catalog prices currently applied over the bundled table.
    - `bundled_model_count` integer, required: Models the bundled price table lists.
    - `entry_count` integer, required: Models stored by the last successful refresh.
    - `last_attempt_at` string, date-time, nullable: When a refresh last started.
    - `last_discovery_at` string, date-time, nullable: When provider keys' models were last rediscovered in the background.
    - `last_error` string, nullable: Why the last attempt failed; `null` after a success.
    - `last_refreshed_at` string, date-time, nullable: When a refresh last succeeded.
    - `last_source_url` string, nullable: The URL the stored catalog came from.
    - `next_refresh_at` string, date-time, nullable: When the next background refresh is due; `null` when automatic refresh is off.
    - `refreshing` boolean, required: A refresh is running right now.
    - `settings` ModelCatalogSettings, required: Where the catalog comes from and how it is refreshed.
      - `auto_refresh` boolean, required: Refresh the catalog in the background.
      - `default_source_url` string, required: The catalog published in the Temps repository.
      - `discover_provider_models` boolean, required: Rediscover every active provider key's models on the same interval.
      - `effective_source_url` string, required: The URL refreshes fetch.
      - `refresh_interval_hours` integer, required: Hours between background refreshes (1 to 168).
      - `source_url` string, nullable: Custom catalog URL; `null` uses `default_source_url`.
    - `skipped_count` integer, required: Entries the last successful refresh rejected as invalid.
  - `stored` integer, required: Models stored.

## Other responses

- `400`: The configured source URL is not allowed
- `401`: Unauthorized
- `403`: Insufficient permissions
- `409`: A refresh is already running
- `500`: Database error
- `502`: The source failed or served an invalid catalog
- `504`: The source did not answer in time

## Changes

- **2026-11-24** `092dd9dae7a3`: 1 info
  - endpoint added
- **2026-11-24** `4496ed4a25a7`: 1 breaking
  - api path removed without deprecation
- **2026-11-23** `e5c54359463f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/model-catalog/refresh/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
