🎉 Portkey raises Series A - $15M to build AI that never breaks  Read announcement →
from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Add a new integration
integration = portkey.integrations.create(
name="openai-production",
ai_provider_id="openai",
key="sk-..."
)
print(integration){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}from portkey_ai import Portkey
# Initialize the Portkey client
portkey = Portkey(
api_key="PORTKEY_API_KEY",
)
# Add a new integration
integration = portkey.integrations.create(
name="openai-production",
ai_provider_id="openai",
key="sk-..."
)
print(integration){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://portkey-docs-log-export-guide-1773064217.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Human-readable name for the integration
"Production OpenAI"
ID of the base AI provider
"openai"
URL-friendly identifier (auto-generated if not provided)
^[a-zA-Z0-9_-]+$"production-openai"
API key for the provider (if required)
"sk-..."
Optional description of the integration
"Production OpenAI integration for customer-facing applications"
Workspace ID (for workspace-scoped integrations)
"ws-my-team-1234"
Provider-specific configuration object
Show child attributes
Whether to automatically create a default provider when creating a workspace-scoped integration. Defaults to true.
Custom slug for the auto-created default provider. Only applicable for workspace-scoped integrations. If the slug already exists in the workspace, the request will fail with a validation error.
255^[a-zA-Z0-9_-]+$Was this page helpful?