🚀 Introducing Agent Gateway — governance, observability, and control for your AI agents.  Register for live webinar ↗
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://docs.portkey.ai/docs/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_-]+$Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations." (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique. When "key" is mapped, the key body field can be omitted.
Show child attributes
Was this page helpful?