Kagura AI External Keys API

External API keys (OpenAI, Cohere, etc.)

GitHub OpenAPI

Operations 5

GET /api/v1/external-keys List External Keys #
POST /api/v1/external-keys Create External Key #
PUT /api/v1/external-keys/{key_name} Update External Key #
DELETE /api/v1/external-keys/{key_name} Delete External Key #
PATCH /api/v1/external-keys/{key_name}/toggle Toggle External Key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/kagura-ai-com:kagura-ai-com-external-keys-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kagura-ai-com-external-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kagura Memory Cloud External Keys API
  description: Universal AI Memory Platform - Remote MCP Server + Web Management
  version: 0.158.1
tags:
- name: external-keys
  description: External API keys (OpenAI, Cohere, etc.)
paths:
  /api/v1/external-keys:
    get:
      tags:
      - external-keys
      summary: List External Keys
      description: 'List all external API keys for the current workspace.


        Issue #381: owner-only (router-level dependency); members, admins, and viewers

        are rejected with 403 before reaching this handler.

        Issue #385: workspace-scoped — returns every key registered in

        `current_workspace_id` regardless of the original creator''s user_id, since

        the workspace owner is the sole manager of these keys.


        Returns masked values for security.'
      operationId: list_external_keys_api_v1_external_keys_get
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalKeyListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - external-keys
      summary: Create External Key
      description: 'Create a new external API key for the current workspace.


        Issue #381: owner-only (router-level dependency).

        Issue #385: workspace-scoped — the new key is stored with the caller''s

        current_workspace_id and context_id=None. Per-workspace uniqueness is

        enforced by (a) the app-layer pre-checks in this handler and (b) the

        partial unique index on (workspace_id, context_id, provider) WHERE enabled=true (NULLS NOT DISTINCT).'
      operationId: create_external_key_api_v1_external_keys_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalKeyCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/external-keys/{key_name}:
    put:
      tags:
      - external-keys
      summary: Update External Key
      description: 'Update an external API key value in the current workspace.


        Issue #381: owner-only (router-level dependency).

        Issue #385: workspace-scoped lookup by (key_name, workspace_id). Any owner

        of the workspace can update any key registered in it, including keys

        originally registered by a previous owner.'
      operationId: update_external_key_api_v1_external_keys__key_name__put
      parameters:
      - name: key_name
        in: path
        required: true
        schema:
          type: string
          title: Key Name
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalKeyUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - external-keys
      summary: Delete External Key
      description: 'Delete an external API key from the current workspace.


        Issue #381: owner-only (router-level dependency).

        Issue #385: workspace-scoped lookup by (key_name, workspace_id); any owner

        can delete any key registered in the workspace.

        Issue #149 / #1613: a protected key is refused with 400. Membership in

        PROTECTED_KEYS alone no longer protects a key — see

        services/external_key_protection.py.'
      operationId: delete_external_key_api_v1_external_keys__key_name__delete
      parameters:
      - name: key_name
        in: path
        required: true
        schema:
          type: string
          title: Key Name
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/external-keys/{key_name}/toggle:
    patch:
      tags:
      - external-keys
      summary: Toggle External Key
      description: 'Toggle enabled/disabled state without re-entering API key value.


        Issue #105: Enable/disable keys for reranker provider switching.

        Issue #246: current_context_id removed - use None


        Rules:

        - A protected key cannot be disabled (Issue #1613: OPENAI_API_KEY, or any

        key whose provider is openai, while OpenAI embeddings are in use — see

        services/external_key_protection.py)

        - Only ONE reranker (Cohere/Voyage) can be enabled at a time


        Issue #381: Owner-only (router-level dependency).'
      operationId: toggle_external_key_api_v1_external_keys__key_name__toggle_patch
      parameters:
      - name: key_name
        in: path
        required: true
        schema:
          type: string
          title: Key Name
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalKeyToggle'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalKeyResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExternalKeyResponse:
      properties:
        key_name:
          type: string
          title: Key Name
        provider:
          type: string
          title: Provider
        masked_value:
          type: string
          title: Masked Value
        user_id:
          type: string
          title: User Id
        enabled:
          type: boolean
          title: Enabled
        is_protected:
          type: boolean
          title: Is Protected
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
      type: object
      required:
      - key_name
      - provider
      - masked_value
      - user_id
      - enabled
      - is_protected
      - created_at
      - updated_at
      title: ExternalKeyResponse
      description: 'External API key response (masked).


        No ``id``: external keys are addressed by ``key_name`` (#1008 dropped the

        integer primary key from the response).'
    ExternalKeyCreate:
      properties:
        key_name:
          type: string
          title: Key Name
        provider:
          type: string
          title: Provider
        value:
          type: string
          title: Value
        enabled:
          type: boolean
          title: Enabled
          default: true
      type: object
      required:
      - key_name
      - provider
      - value
      title: ExternalKeyCreate
      description: Create external API key request.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ExternalKeyListResponse:
      properties:
        keys:
          items:
            $ref: '#/components/schemas/ExternalKeyResponse'
          type: array
          title: Keys
        total:
          type: integer
          title: Total
      type: object
      required:
      - keys
      - total
      title: ExternalKeyListResponse
      description: External API keys list response.
    ExternalKeyToggle:
      properties:
        enabled:
          type: boolean
          title: Enabled
      type: object
      required:
      - enabled
      title: ExternalKeyToggle
      description: 'Toggle enabled/disabled state (Issue #105).'
    ExternalKeyUpdate:
      properties:
        value:
          type: string
          title: Value
      type: object
      required:
      - value
      title: ExternalKeyUpdate
      description: Update external API key request.