POST
/
configs
from portkey_ai import Portkey

portkey = Portkey()

# Create a new configuration
config = portkey.configs.create(
name="ConfigName_0909",
config={
"retry": {
"attempts": 3
},
"cache": {
"mode": "simple"
}
},
workspace_id="WORKSPACE_ID",
)

print(config)
{
  "success": true,
  "data": {
    "id": "f3d8d070-f29d-43a3-bf97-3159c60f4ce0",
    "version_id": "0db4065b-ead2-4daa-bf5e-7e9106585133"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200 - application/json

Config created successfully

The response is of type object.