# Sync models from an LLM provider

Source: <https://everruns.com/docs/api/operations/sync_models/>

POST

/v1/providers/{id}/sync-models

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/providers/example/sync-models';
const options = {method: 'POST'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/providers/example/sync-models
```

* Production APIapp.everruns.com/api/v1/providers/{id}/sync-models

Fetches the list of available models from the provider’s API and updates the database. Only works for providers with standard base URLs (not custom).

## Parameters

### Path Parameters

**id**

required

string

Provider ID (prefixed, e.g., prov\_…)

## Responses

### 200

Models synced

Media typeapplication/json

One of:

* object

  Sync completed successfully

  object

  **created**

  required

  Number of new models discovered

  integer

  **stale**

  required

  Number of models marked as stale (not seen in this sync)

  integer

  **status**

  required

  string

  Allowed values: success

  **updated**

  required

  Number of existing models updated

  integer

* object

  Provider doesn’t support model discovery

  object

  **status**

  required

  string

  Allowed values: not\_supported

##### Example

```json
{
  "status": "success"
}
```

### 400

Invalid provider ID

### 404

Provider not found

### 422

Provider rejected or could not serve the model list (code `provider_sync_failed`)