from portkey_ai import Portkey
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# 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"
}
}
from portkey_ai import Portkey
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# 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"
}
}
Config created successfully
The response is of type object
.
Was this page helpful?