Upsert Provider

POST /save-model-provider

Creates or updates a model provider

Request

Headers

An API Key is required to access this endpoint.

Name
Value

x-api-key

your_api_key

Body

Name
Type
Description

id

string

Unique ID for the model provider.

config

Config for the model provider.

type

enum

Supported enums: BEDROCK OPENAI

useInstancePermissions

boolean

Supported on VPC deploy only.

Config

The parameters in the config will vary based on the model provider type.

BEDROCK

Name
Type
Description

awsAccessKeyId

string

Your AWS Bedrock access key ID.

awsSecretAccessKey

string

Your AWS Bedrock secret access key.

awsRegion

string

Your AWS Bedrock region.

OPENAI

Name
Type
Description

apiKey

string

Your OpenAI API key.

Example

{
  "config": {
    "awsAccessKeyId": "**********",
    "awsSecretAccessKey": "**********",
    "awsRegion": "**********"
  },
  "type": "BEDROCK"
}

Response

The API returns the response in JSON format.

Each response includes a success boolean and the modelProvider object.

Example

{
  "modelProvider": {
    "id": "9610b859-fe94-4c3c-a826-a4d484f039a6",
    "foundationModels": [{ "id": "b35d4304-8897-4102-b62d-575c59e36544", "type": "anthropic.claude-3-haiku-20240307-v1:0" }],
    "type": "BEDROCK"
  },
  "success": true
}

Last updated