Portkey Integrations API

Create, List, Retrieve, Update, and Delete your Portkey Integrations.

OpenAPI Specification

portkey-integrations-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Portkey Analytics > Graphs Integrations API
  description: The Portkey REST API. Please see https://portkey.ai/docs/api-reference for more details.
  version: 2.0.0
  termsOfService: https://portkey.ai/terms
  contact:
    name: Portkey Developer Forum
    url: https://portkey.wiki/community
  license:
    name: MIT
    url: https://github.com/Portkey-AI/portkey-openapi/blob/master/LICENSE
servers:
- url: https://api.portkey.ai/v1
  description: Portkey API Public Endpoint
security:
- Portkey-Key: []
tags:
- name: Integrations
  description: Create, List, Retrieve, Update, and Delete your Portkey Integrations.
paths:
  /integrations:
    servers:
    - url: https://api.portkey.ai/v1
      description: Portkey API Public Endpoint
    - url: SELF_HOSTED_CONTROL_PLANE_URL
      description: Self-Hosted Control Plane URL
    get:
      summary: List All Integrations
      tags:
      - Integrations
      parameters:
      - in: query
        name: current_page
        schema:
          type: integer
        description: Current page, defaults to 0
      - in: query
        name: page_size
        schema:
          type: integer
        description: Page size, default to 100
      - in: query
        name: workspace_id
        schema:
          type: string
        description: Filter integrations accessible by a specific workspace. When using workspace API keys, this value will be enforced based on the API key details
      - in: query
        name: type
        schema:
          type: string
          enum:
          - workspace
          - organisation
          - all
          default: all
        description: For type=workspace, the API will only return Workpace-Scoped integrations. For type=organisation, the API will only return Global (organisation level) integrations. For type=all, both types of integrations will be returned.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                    - list
                  total:
                    type: integer
                    description: Total number of integrations
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/IntegrationList'
      x-code-samples:
      - lang: python
        label: Default
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n)\n\n# List integrations\nintegrations = portkey.integrations.list()\n\nprint(integrations)\n"
      - lang: javascript
        label: Default
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n})\n\nconst integrations = await portkey.integrations.list({})\nconsole.log(integrations);\n"
      - lang: curl
        label: Default
        source: 'curl -X GET https://api.portkey.ai/v1/integrations \

          -H "x-portkey-api-key: PORTKEY_API_KEY"

          '
      - lang: python
        label: Self-Hosted
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n    base_url=\"SELF_HOSTED_CONTROL_PLANE_URL\"\n)\n\n# List integrations\nintegrations = portkey.integrations.list()\n\nprint(integrations)\n"
      - lang: javascript
        label: Self-Hosted
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n    baseUrl: \"SELF_HOSTED_CONTROL_PLANE_URL\"\n})\n\nconst integrations = await portkey.integrations.list({})\nconsole.log(integrations);\n"
      - lang: curl
        label: Self-Hosted
        source: 'curl -X GET SELF_HOSTED_CONTROL_PLANE_URL/integrations \

          -H "x-portkey-api-key: PORTKEY_API_KEY"

          '
    post:
      summary: Create a Integration
      tags:
      - Integrations
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIntegrationRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: UUID
                  slug:
                    type: string
      x-code-samples:
      - lang: python
        label: Default
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n)\n\n# Add a new integration\nintegration = portkey.integrations.create(\n    name=\"openai-production\",\n    ai_provider_id=\"openai\",\n    key=\"sk-...\"\n)\n\nprint(integration)\n"
      - lang: javascript
        label: Default
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n})\n\nconst integration = await portkey.integrations.create({\n    name:\"openai-production\",\n    ai_provider_id:\"openai\",\n    key:\"sk-...\",\n})\nconsole.log(integration);\n"
      - lang: curl
        label: Default
        source: "curl -X POST https://api.portkey.ai/v1/integrations \\\n-H \"x-portkey-api-key: PORTKEY_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n    \"name\": \"openai-production\",\n    \"ai_provider_id\": \"openai\",\n    \"key\": \"sk-...\"\n}'\n"
      - lang: python
        label: Self-Hosted
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n    base_url=\"SELF_HOSTED_CONTROL_PLANE_URL\"\n)\n\n# Add a new integration\nintegration = portkey.integrations.create(\n    name=\"openai-production\",\n    ai_provider_id=\"openai\",\n    key=\"sk-...\"\n)\n\nprint(integration)\n"
      - lang: javascript
        label: Self-Hosted
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n    baseUrl: \"SELF_HOSTED_CONTROL_PLANE_URL\"\n})\n\nconst integration = await portkey.integrations.create({\n    name: \"openai-production\",\n    ai_provider_id: \"openai\",\n    key: \"sk-...\",\n})\nconsole.log(integration);\n"
      - lang: curl
        label: Self-Hosted
        source: "curl -X POST SELF_HOSTED_CONTROL_PLANE_URL/integrations \\\n-H \"x-portkey-api-key: PORTKEY_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n    \"name\": \"openai-production\",\n    \"ai_provider_id\": \"openai\",\n    \"key\": \"sk-...\"\n}'\n"
  /integrations/{slug}:
    servers:
    - url: https://api.portkey.ai/v1
      description: Portkey API Public Endpoint
    - url: SELF_HOSTED_CONTROL_PLANE_URL
      description: Self-Hosted Control Plane URL
    get:
      summary: Get a Integration
      tags:
      - Integrations
      parameters:
      - in: path
        name: slug
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntegrationDetailResponse'
      x-code-samples:
      - lang: python
        label: Default
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n)\n\n# Get a specific virtual key\nvirtual_key = portkey.virtual_keys.retrieve(\n    slug='VIRTUAL_KEY_SLUG'\n)\n\nprint(virtual_key)\n"
      - lang: javascript
        label: Default
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n})\n\nconst vKey=await portkey.virtualKeys.retrieve({\n    slug:'VIRTUAL_KEY_SLUG'\n})\nconsole.log(vKey);\n"
      - lang: curl
        label: Default
        source: 'curl -X GET https://api.portkey.ai/v1/virtual-keys/VIRTUAL_KEY_SLUG \

          -H "x-portkey-api-key: PORTKEY_API_KEY"

          '
      - lang: curl
        label: Self-Hosted
        source: 'curl -X GET SELF_HOSTED_CONTROL_PLANE_URL/virtual-keys/VIRTUAL_KEY_SLUG \

          -H "x-portkey-api-key: PORTKEY_API_KEY"

          '
      - lang: python
        label: Self-Hosted
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n    base_url=\"SELF_HOSTED_CONTROL_PLANE_URL\"\n)\n\n# Get a specific virtual key\nvirtual_key = portkey.virtual_keys.retrieve(\n    slug='VIRTUAL_KEY_SLUG'\n)\n\nprint(virtual_key)\n"
      - lang: javascript
        label: Self-Hosted
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n    baseUrl: \"SELF_HOSTED_CONTROL_PLANE_URL\"\n})\n\nconst vKey=await portkey.virtualKeys.retrieve({\n    slug:'VIRTUAL_KEY_SLUG'\n})\nconsole.log(vKey);\n"
    put:
      summary: Update a Integration
      tags:
      - Integrations
      parameters:
      - in: path
        name: slug
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateIntegrationRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      x-code-samples:
      - lang: python
        label: Default
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n)\n\n# Update a specific integration\nintegration = portkey.integrations.update(\n    slug=\"INTEGRATION_SLUG',\n    name=\"updated-name\",\n    note=\"hello\"\n)\n\nprint(integration)\n"
      - lang: javascript
        label: Default
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n})\n\nconst integration = await portkey.integrations.update({\n    slug:\"INTEGRATION_SLUG\",\n    name:\"updated-name\",\n    note:\"hello\"\n})\nconsole.log(integration);\n"
      - lang: curl
        label: Default
        source: "curl -X PUT \"https://api.portkey.ai/v1/integrations/INTEGRATION_SLUG\" \\\n-H \"x-portkey-api-key: PORTKEY_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n    \"name\": \"updated-name\",\n    \"note\": \"hello\"\n}'\n"
      - lang: curl
        label: Self-Hosted
        source: "curl -X PUT \"SELF_HOSTED_CONTROL_PLANE_URL/integrations/INTEGRATION_SLUG\" \\\n-H \"x-portkey-api-key: PORTKEY_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n    \"name\": \"updated-name\",\n    \"note\": \"hello\"\n}'\n"
      - lang: python
        label: Self-Hosted
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n    base_url=\"SELF_HOSTED_CONTROL_PLANE_URL\"\n)\n\n# Update a specific integration\nintegration = portkey.integrations.update(\n    slug=\"INTEGRATION_SLUG',\n    name=\"updated-name\",\n    note=\"hello\"\n)\n\nprint(integration)\n"
      - lang: javascript
        label: Self-Hosted
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n    baseUrl: \"SELF_HOSTED_CONTROL_PLANE_URL\"\n})\n\nconst integration = await portkey.integrations.update({\n    slug:'INTEGRATION_SLUG',\n    name:\"updated-name\",\n    note:\"hello\"\n})\nconsole.log(integration);\n"
    delete:
      summary: Delete a Integration
      tags:
      - Integrations
      parameters:
      - in: path
        name: slug
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      x-code-samples:
      - lang: python
        label: Default
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n)\n\n# Delete a specific integration\nresult = portkey.integrations.delete(\n    slug=\"INTEGRATION_SLUG\"\n)\n\nprint(result)\n"
      - lang: javascript
        label: Default
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n})\n\nconst result=await portkey.integrations.delete({\n    slug:'INTEGRATION_SLUG',\n})\nconsole.log(result);\n"
      - lang: curl
        label: Default
        source: 'curl -X DELETE https://api.portkey.ai/v1/integrations/INTEGRATION_SLUG

          '
      - lang: curl
        label: Self-Hosted
        source: 'curl -X DELETE https://SELF_HOSTED_CONTROL_PLANE_URL/integrations/INTEGRATION_SLUG

          '
      - lang: python
        label: Self-Hosted
        source: "from portkey_ai import Portkey\n\n# Initialize the Portkey client\nportkey = Portkey(\n    api_key=\"PORTKEY_API_KEY\",\n    base_url=\"SELF_HOSTED_CONTROL_PLANE_URL\"\n)\n\n# Delete a specific integration\nresult = portkey.integrations.delete(\n    slug=\"INTEGRATION_SLUG\"\n)\n\nprint(result)\n"
      - lang: javascript
        label: Self-Hosted
        source: "import { Portkey } from \"portkey-ai\";\n\nconst portkey = new Portkey({\n    apiKey: \"PORTKEY_API_KEY\",\n    baseUrl: \"SELF_HOSTED_CONTROL_PLANE_URL\"\n})\n\nconst result=await portkey.integrations.delete({\n    slug:\"INTEGRATION_SLUG\",\n})\nconsole.log(result);\n"
components:
  schemas:
    AzureAIConfiguration:
      type: object
      required:
      - azure_foundry_url
      - azure_auth_mode
      properties:
        azure_auth_mode:
          type: string
          enum:
          - default
          - entra
          - managed
          description: Authentication mode for Azure AI
        azure_foundry_url:
          type: string
          description: Azure AI Foundry URL
        azure_api_version:
          type: string
          maxLength: 30
          description: Azure API version
        azure_deployment_name:
          type: string
          description: Azure deployment name
        azure_entra_tenant_id:
          type: string
          description: Azure AD tenant ID (required for entra auth)
        azure_entra_client_id:
          type: string
          description: Azure AD client ID (required for entra auth)
        azure_entra_client_secret:
          type: string
          description: Azure AD client secret (required for entra auth)
        azure_managed_client_id:
          type: string
          description: Managed identity client ID (optional for managed auth)
    AzureDeploymentConfig:
      type: object
      required:
      - azure_api_version
      - azure_deployment_name
      - azure_model_slug
      properties:
        alias:
          type: string
          description: Alias for the deployment
        azure_api_version:
          type: string
          maxLength: 30
          description: Azure API version
        azure_deployment_name:
          type: string
          description: Azure deployment name
        is_default:
          type: boolean
          default: false
          description: Whether this is the default deployment
        azure_model_slug:
          type: string
          description: Azure model slug
    SecretMapping:
      type: object
      required:
      - target_field
      - secret_reference_id
      properties:
        target_field:
          type: string
          description: 'The field on the entity to populate from the secret reference. Must be unique within the array.

            - **Integrations**: `key` or `configurations.<field>` (e.g. `configurations.aws_secret_access_key`)

            - **Virtual Keys**: `key` or `model_config.<field>` (e.g. `model_config.awsSecretAccessKey`)

            '
          example: key
        secret_reference_id:
          type: string
          description: UUID or slug of the secret reference. Must belong to the same organisation and be accessible by the workspace.
          example: my-aws-secret
        secret_key:
          type: string
          nullable: true
          description: Override the secret_key defined on the secret reference. Use to pick a specific key from a multi-value secret.
    GlobalWorkspaceAccess:
      type: object
      required:
      - enabled
      properties:
        enabled:
          type: boolean
          description: Whether global workspace access is enabled. When enabled, the integration will be enabled for all workspaces that are created in future.
        usage_limits:
          type: array
          nullable: true
          maxItems: 1
          items:
            $ref: '#/components/schemas/UsageLimits'
        rate_limits:
          type: array
          nullable: true
          maxItems: 1
          items:
            $ref: '#/components/schemas/RateLimits'
    UsageLimits:
      type: object
      properties:
        credit_limit:
          type: integer
          description: Credit Limit. Used for tracking usage
          minimum: 1
          default: null
        type:
          type: string
          description: Type of credit limit
          enum:
          - cost
          - tokens
        alert_threshold:
          type: integer
          description: Alert Threshold. Used for alerting when usage reaches more than this
          minimum: 1
          default: null
        periodic_reset:
          type: string
          description: Reset the usage periodically.
          enum:
          - monthly
          - weekly
          nullable: true
          example: monthly
        periodic_reset_days:
          type: integer
          description: Reset the usage counter every N days (1-365). Mutually exclusive with periodic_reset.
          minimum: 1
          maximum: 365
          nullable: true
          example: 30
        next_usage_reset_at:
          type: string
          format: date-time
          description: ISO 8601 datetime for the next scheduled usage reset. Auto-computed from periodic_reset or periodic_reset_days if not provided.
          nullable: true
          example: '2026-05-01T00:00:00Z'
      example:
        credit_limit: 10
        periodic_reset: monthly
        alert_threshold: 8
    RateLimits:
      type: object
      properties:
        type:
          type: string
          enum:
          - requests
          - tokens
        unit:
          type: string
          enum:
          - rpd
          - rph
          - rpm
        value:
          type: integer
    SageMakerConfiguration:
      allOf:
      - $ref: '#/components/schemas/BedrockConfiguration'
      - type: object
        properties:
          amzn_sagemaker_custom_attributes:
            type: string
            description: Custom attributes for SageMaker
          amzn_sagemaker_target_model:
            type: string
            description: Target model for SageMaker
          amzn_sagemaker_target_variant:
            type: string
            description: Target variant for SageMaker
          amzn_sagemaker_target_container_hostname:
            type: string
            description: Target container hostname
          amzn_sagemaker_inference_id:
            type: string
            description: Inference ID
          amzn_sagemaker_enable_explanations:
            type: string
            description: Enable explanations
          amzn_sagemaker_inference_component:
            type: string
            description: Inference component
          amzn_sagemaker_session_id:
            type: string
            description: Session ID
          amzn_sagemaker_model_name:
            type: string
            description: Model name
    UpdateIntegrationRequest:
      type: object
      properties:
        name:
          type: string
          description: Human-readable name for the integration
          example: Production OpenAI
        key:
          type: string
          description: API key for the provider (if required)
          example: sk-...
        description:
          type: string
          description: Optional description of the integration
          example: Production OpenAI integration for customer-facing applications
        configurations:
          type: object
          description: Provider-specific configuration object
          oneOf:
          - $ref: '#/components/schemas/OpenAIConfiguration'
            title: OpenAI
          - $ref: '#/components/schemas/AzureOpenAIConfiguration'
            title: Azure OpenAI
          - $ref: '#/components/schemas/BedrockConfiguration'
            title: AWS Bedrock
          - $ref: '#/components/schemas/VertexAIConfiguration'
            title: Vertex AI
          - $ref: '#/components/schemas/AzureAIConfiguration'
            title: Azure AI
          - $ref: '#/components/schemas/WorkersAIConfiguration'
            title: Workers AI
          - $ref: '#/components/schemas/SageMakerConfiguration'
            title: AWS Sagemaker
          - $ref: '#/components/schemas/HuggingFaceConfiguration'
            title: Hugginface
          - $ref: '#/components/schemas/CortexConfiguration'
            title: Cortex
          - $ref: '#/components/schemas/CustomHostConfiguration'
            title: Custom Base URL
        secret_mappings:
          type: array
          items:
            $ref: '#/components/schemas/SecretMapping'
          description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations.<field>" (e.g. "configurations.aws_secret_access_key", "configurations.azure_entra_client_secret"). Each target_field must be unique.
    AzureOpenAIConfiguration:
      type: object
      required:
      - azure_resource_name
      - azure_deployment_config
      - azure_auth_mode
      properties:
        azure_auth_mode:
          type: string
          enum:
          - default
          - entra
          - managed
          description: Authentication mode for Azure
        azure_resource_name:
          type: string
          description: Azure OpenAI resource name
        azure_deployment_config:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AzureDeploymentConfig'
        azure_entra_tenant_id:
          type: string
          description: Azure AD tenant ID (required for entra auth)
        azure_entra_client_id:
          type: string
          description: Azure AD client ID (required for entra auth)
        azure_entra_client_secret:
          type: string
          description: Azure AD client secret (required for entra auth)
        azure_managed_client_id:
          type: string
          description: Managed identity client ID (optional for managed auth)
    BedrockConfiguration:
      type: object
      required:
      - aws_auth_type
      - aws_region
      properties:
        aws_auth_type:
          type: string
          enum:
          - accessKey
          - assumedRole
          description: AWS authentication type
        aws_region:
          type: string
          description: AWS region
        aws_access_key_id:
          type: string
          description: AWS access key ID (required for accessKey auth)
        aws_secret_access_key:
          type: string
          description: AWS secret access key (required for accessKey auth)
        aws_role_arn:
          type: string
          description: AWS role ARN (required for assumedRole auth)
        aws_external_id:
          type: string
          nullable: true
          description: AWS external ID (optional for assumedRole auth)
    CreateIntegrationRequest:
      type: object
      required:
      - name
      - ai_provider_id
      properties:
        name:
          type: string
          description: Human-readable name for the integration
          example: Production OpenAI
        slug:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
          description: URL-friendly identifier (auto-generated if not provided)
          example: production-openai
        ai_provider_id:
          type: string
          description: ID of the base AI provider
          example: openai
        key:
          type: string
          description: API key for the provider (if required)
          example: sk-...
        description:
          type: string
          description: Optional description of the integration
          example: Production OpenAI integration for customer-facing applications
        workspace_id:
          type: string
          description: Workspace ID (for workspace-scoped integrations)
          example: ws-my-team-1234
        configurations:
          type: object
          description: Provider-specific configuration object
          oneOf:
          - $ref: '#/components/schemas/OpenAIConfiguration'
            title: OpenAI
          - $ref: '#/components/schemas/AzureOpenAIConfiguration'
            title: Azure OpenAI
          - $ref: '#/components/schemas/BedrockConfiguration'
            title: AWS Bedrock
          - $ref: '#/components/schemas/VertexAIConfiguration'
            title: Vertex AI
          - $ref: '#/components/schemas/AzureAIConfiguration'
            title: Azure AI
          - $ref: '#/components/schemas/WorkersAIConfiguration'
            title: Workers AI
          - $ref: '#/components/schemas/SageMakerConfiguration'
            title: AWS Sagemaker
          - $ref: '#/components/schemas/HuggingFaceConfiguration'
            title: Hugginface
          - $ref: '#/components/schemas/CortexConfiguration'
            title: Cortex
          - $ref: '#/components/schemas/CustomHostConfiguration'
            title: Custom Base URL
        create_default_provider:
          type: boolean
          default: true
          description: Whether to automatically create a default provider when creating a workspace-scoped integration. Defaults to true.
        default_provider_slug:
          type: string
          pattern: ^[a-zA-Z0-9_-]+$
          maxLength: 255
          description: 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.
        secret_mappings:
          type: array
          items:
            $ref: '#/components/schemas/SecretMapping'
          description: Dynamically resolve secrets from secret references at runtime. Valid target_field values are "key" or "configurations.<field>" (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.
    OpenAIConfiguration:
      type: object
      properties:
        openai_organization:
          type: string
          description: OpenAI organization ID
        openai_project:
          type: string
          description: OpenAI project ID
    CustomHostConfiguration:
      type: object
      properties:
        custom_host:
          type: string
          description: Custom host URL (can be used along with other provider specific configuration fields)
        custom_headers:
          type: object
          additionalProperties:
            type: string
          description: Custom headers to send with requests (can be used along with other provider specific configuration fields)
    CortexConfiguration:
      type: object
      required:
      - snowflake_account
      properties:
        snowflake_account:
          type: string
          description: Snowflake account identifier
    HuggingFaceConfiguration:
      type: object
      properties:
        huggingface_base_url:
          type: string
          description: Custom Hugging Face base URL
    IntegrationList:
      type: object
      properties:
        id:
          type: string
          format: UUID
        organisation_id:
          type: string
          format: UUID
        ai_provider_id:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
          - active
          - archived
        created_at:
          type: string
          format: date-time
        last_updated_at:
          type: string
          format: date-time
          nullable: true
        slug:
          type: string
        description:
          type: string
        object:
          type: string
          enum:
          - integration
    IntegrationDetailResponse:
      allOf:
      - $ref: '#/components/schemas/IntegrationList'
      - type: object
        properties:
          masked_key:
            type: string
            description: Masked API key
          configurations:
            type: object
            description: 'Provider-specific configuration object


              **⚠️ Security Note - Response Masking:**

              When retrieving integration details, sensitive fields are automatically masked:

              - Sensitive fields get a `masked_` prefix (e.g., `client_secret` → `masked_client_secret`)

              - Non-sensitive fields (IDs, URLs, regions, etc.) remain unchanged

              '
            oneOf:
            - $ref: '#/components/schemas/OpenAIConfiguration'
              title: OpenAI
            - $ref: '#/components/schemas/AzureOpenAIConfiguration'
              title: Azure OpenAI
            - $ref: '#/components/schemas/BedrockConfiguration'
              title: AWS Bedrock
            - $ref: '#/components/schemas/VertexAIConfiguration'
              title: Vertex AI
            - $ref: '#/components/schemas/AzureAIConfiguration'
              title: Azure AI
            - $ref: '#/components/schemas/WorkersAIConfiguration'
              title: Workers AI
            - $ref: '#/components/schemas/SageMakerConfiguration'
              title: AWS Sagemaker
            - $ref: '#/components/schemas/HuggingFaceConfiguration'
              title: Hugginface
            - $ref: '#/components/schemas/CortexConfiguration'
              title: Cortex
            - $ref: '#/components/schemas/CustomHostConfiguration'
              title: Custom Base URL
          global_workspace_access_settings:
            type: object
            nullable: true
            $ref: '#/components/schemas/GlobalWorkspaceAccess'
            description: Global workspace access configuration
          allow_all_models:
            type: boolean
            description: Whether new models will be enabled by default
          workspace_count:
            type: integer
            description: Number of workspaces with access to this integration
          secret_mappings:
            type: array
            items:
              $ref: '#/components/schemas/SecretMapping'
            description: Secret reference mappings for this integration. Valid target_field values are "key" or "configurations.<field>".
    WorkersAIConfiguration:
      type: object
      required:
      - workers_ai_account_id
      properties:
        workers_ai_account_id:
          type: string
          description: Cloudflare Workers AI account ID
    VertexAIConfiguration:
      type: object
      required:
      - vertex_auth_type
      - vertex_region
      properties:
        vertex_auth_type:
          type: string
          enum:
          - basic
          - serviceAccount
          description: Vertex AI authentication type
        vertex_region:
          type: string
          description: GCP region
        vertex_project_id:
          type: string
          description: GCP project ID (required for basic auth)
        vertex_service_account_json:
          type: object
          description: Service account JSON (required for serviceAccount auth)
  securitySchemes:
    Portkey-Key:
      type: apiKey
      in: header
      name: x-portkey-api-key
    Virtual-Key:
      type: apiKey
      in: header
      name: x-portkey-virtual-key
    Provider-Auth:
      type: http
      scheme: bearer
    Provider-Name:
      type: apiKey
      in: header
      name: x-portkey-provider
    Config:
      type: apiKey
      in: header
      name: x-portkey-config
    Custom-Host:
      type: apiKey
      in: header
      name: x-portkey-custom-host
x-server-groups:
  ControlP

# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/portkey/refs/heads/main/openapi/portkey-integrations-api-openapi.yml