> ## Documentation Index
> Fetch the complete documentation index at: https://docs.litellm-agent-platform.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Save runtime credentials



## OpenAPI

````yaml PUT /api/agent-runtimes/{runtime}/credentials
openapi: 3.0.3
info:
  title: LiteLLM Agent Platform API
  description: >-
    Unified API for the LiteLLM Agent Platform — gateway, agents, sessions, and
    runtimes.
  version: 0.1.0
servers:
  - url: https://litellm-rust.onrender.com
    description: Production
  - url: http://localhost:4000
    description: Local (Docker Compose)
security:
  - BearerAuth: []
tags:
  - name: System
  - name: Models
  - name: Messages
  - name: API Keys
  - name: Agents
  - name: Sessions
  - name: Runtimes
  - name: MCP
paths:
  /api/agent-runtimes/{runtime}/credentials:
    put:
      tags:
        - Runtimes
      summary: Save credentials for a built-in runtime
      operationId: saveAgentRuntimeCredential
      parameters:
        - name: runtime
          in: path
          required: true
          schema:
            type: string
            enum:
              - claude_managed_agents
              - cursor
              - gemini_antigravity
              - elastic_agent_builder
          example: cursor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveRuntimeCredentialRequest'
      responses:
        '200':
          description: Credential saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentRuntimesResponse'
        '401':
          description: Unauthorized
      security:
        - BearerAuth: []
components:
  schemas:
    SaveRuntimeCredentialRequest:
      type: object
      required:
        - api_key
      properties:
        api_key:
          type: string
          example: sk-...
        api_base:
          type: string
          description: Optional. Defaults to the runtime's built-in base URL when omitted.
          example: https://api.cursor.com
    AgentRuntimesResponse:
      type: object
      properties:
        runtimes:
          type: array
          items:
            $ref: '#/components/schemas/AgentRuntime'
    AgentRuntime:
      type: object
      properties:
        id:
          type: string
          enum:
            - claude_managed_agents
            - cursor
            - gemini_antigravity
            - elastic_agent_builder
        name:
          type: string
          example: Cursor
        default_api_base:
          type: string
          example: https://api.cursor.com
        credential_provider_id:
          type: string
          example: cursor
        credential_provider_name:
          type: string
          example: Cursor
        tools:
          type: array
          items:
            type: object
        connected:
          type: boolean
        api_base:
          type: string
          nullable: true
        masked_api_key:
          type: string
          nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'Your LITELLM_MASTER_KEY. Default for local Docker Compose: `sk-local`'

````