# Set the project's own spending limits and route names

`PUT /models/v1/settings` · Rivier · models

Set the project's own spending limits and route names. A limit is at or below what the project may spend already; null removes it. A route name of the project's own stands on a route the project is given (`as`), with its own vector size or answer length. Only a signed-in person who manages the project can call this; a key reads the settings.

- Scope: models:write
- Graphql: Mutation.modelsSettingsSet
- Sdk: models.settings.set
- Cli: models settings set

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "routes": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "as": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9._-]{0,39}$"
              },
              "dims": {
                "type": "integer",
                "minimum": 1,
                "maximum": 8192
              },
              "maxOutputTokens": {
                "type": "integer",
                "minimum": 1,
                "maximum": 65536
              }
            },
            "required": [
              "as"
            ],
            "additionalProperties": false
          },
          "propertyNames": {
            "pattern": "^[a-z][a-z0-9._-]{0,39}$"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "dailyUsd": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        {
          "type": "null"
        }
      ]
    },
    "monthlyUsd": {
      "anyOf": [
        {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        {
          "type": "null"
        }
      ]
    },
    "dataPolicy": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "requireNoTraining": {
              "type": "boolean",
              "default": false
            },
            "regions": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "maxItems": 20
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PUT 'https://api.rivier.ai/models/v1/settings' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "routes": {},
  "dailyUsd": 0,
  "monthlyUsd": 0,
  "dataPolicy": {
    "requireNoTraining": false,
    "regions": null
  }
}'
```
