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

# Create LLM config

> Create a new LLM provider configuration



## OpenAPI

````yaml /api-reference/openapi.json post /api/agents/llm-configs
openapi: 3.0.0
info:
  title: Open Attack Surface Management
  description: Open-source platform for cybersecurity Attack Surface Management (ASM)
  version: '1.0'
  contact: {}
servers:
  - url: https://{baseUrl}/api/v1
    variables:
      baseUrl:
        default: localhost:3000
        description: API server hostname with port (e.g. localhost:3000, api.example.com)
security: []
tags: []
externalDocs:
  description: Authentication Docs
  url: auth/docs
paths:
  /api/agents/llm-configs:
    post:
      tags:
        - Agents
      summary: Create LLM config
      description: Create a new LLM provider configuration
      operationId: AgentsController_createLLMConfig
      parameters:
        - name: X-Workspace-Id
          in: header
          description: Workspace ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLLMConfigDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LLMConfigResponseDto'
                allOf:
                  - $ref: '#/components/schemas/AppResponseSerialization'
components:
  schemas:
    CreateLLMConfigDto:
      type: object
      properties:
        provider:
          type: string
          enum:
            - openai
            - anthropic
            - gemini
            - openrouter
            - vercel
            - deepseek
            - kilo_code
            - opencode_go
            - custom
          example: openrouter
        name:
          type: string
          example: My OpenAI key
        apiKey:
          type: string
        model:
          type: string
        apiUrl:
          type: string
        contextWindow:
          type: number
          example: 8192
          description: Custom context window size in tokens. Overrides API-provided value.
      required:
        - provider
        - apiKey
    LLMConfigResponseDto:
      type: object
      properties:
        id:
          type: string
        provider:
          type: string
          enum:
            - openai
            - anthropic
            - gemini
            - openrouter
            - vercel
            - deepseek
            - kilo_code
            - opencode_go
            - custom
        name:
          type: string
        model:
          type: string
        apiUrl:
          type: string
        contextWindow:
          type: number
        isPreferred:
          type: boolean
        apiKeyMasked:
          type: string
          description: Masked API key (shows last 4 chars)
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
      required:
        - id
        - provider
        - model
        - isPreferred
        - apiKeyMasked
        - createdAt
        - updatedAt

````