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

# Create External API Configuration

> Create external API configuration.



## OpenAPI

````yaml /openapi.json post /v1/external-apis
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /v1/external-apis:
    post:
      tags:
        - External APIs
      summary: Create External API Configuration
      description: Create external API configuration.
      operationId: create_external_api_v1_external_apis_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExternalApiRequest'
              description: External API configuration data.
      responses:
        '201':
          description: Created External API Configuration with ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    CreateExternalApiRequest:
      oneOf:
        - $ref: '#/components/schemas/CreateOpenaiCompatibleLlmExternalApiRequest'
      discriminator:
        propertyName: type
        mapping:
          openai_compatible_llm:
            $ref: '#/components/schemas/CreateOpenaiCompatibleLlmExternalApiRequest'
    ExternalApiResponse:
      oneOf:
        - $ref: '#/components/schemas/OpenaiCompatibleLlmExternalApiResponse'
      discriminator:
        propertyName: type
        mapping:
          openai_compatible_llm:
            $ref: '#/components/schemas/OpenaiCompatibleLlmExternalApiResponse'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateOpenaiCompatibleLlmExternalApiRequest:
      properties:
        type:
          type: string
          const: openai_compatible_llm
          title: Type
          default: openai_compatible_llm
        name:
          type: string
          title: Name
        url:
          type: string
          title: Url
        api_key:
          type: string
          format: password
          title: Api Key
          writeOnly: true
      type: object
      required:
        - name
        - url
        - api_key
      title: CreateOpenaiCompatibleLlmExternalApiRequest
      description: Request body to create an OpenAI-compatible LLM API configuration.
    OpenaiCompatibleLlmExternalApiResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier of the object in the database.
          examples:
            - 01234567-89ab-cdef-0123-456789abcdef
        type:
          type: string
          const: openai_compatible_llm
          title: Type
          default: openai_compatible_llm
        name:
          type: string
          title: Name
        url:
          type: string
          title: Url
      type: object
      required:
        - id
        - name
        - url
      title: OpenaiCompatibleLlmExternalApiResponse
      description: Response body for an OpenAI-compatible LLM API configuration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Your Beyond Presence API Key.
      in: header
      name: x-api-key

````