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

# Create Connection

> Create and validate a provider connection. Credentials and connection_settings are separate from per-service model settings; a write may perform provider validation.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/model-connections/provider-connections
openapi: 3.1.0
info:
  title: Athena API
  version: 1.0.0
  description: >-
    Hosted Athena customer API. Authenticate backend management and call-trigger
    requests with X-API-Key. Website embeds and artifact playback use their own
    scoped tokens. Provider availability, feature settings, and verification
    limits are described in the guides.
servers:
  - url: https://athena.tryopencomputer.com
    description: Hosted Athena API
security: []
paths:
  /api/v1/model-connections/provider-connections:
    post:
      tags:
        - Model Connections
      summary: Create Connection
      description: >-
        Create and validate a provider connection. Credentials and
        connection_settings are separate from per-service model settings; a
        write may perform provider validation.
      operationId: create_provider_connection
      parameters:
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProviderConnectionCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderConnectionResponse'
        '401':
          description: Authentication is missing or invalid.
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    ProviderConnectionCreate:
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 1
          title: Name
        provider:
          type: string
          maxLength: 64
          minLength: 1
          title: Provider
        credentials:
          additionalProperties: true
          type: object
          title: Credentials
        connection_settings:
          additionalProperties: true
          type: object
          title: Connection Settings
      additionalProperties: false
      type: object
      required:
        - name
        - provider
      title: ProviderConnectionCreate
    ProviderConnectionResponse:
      properties:
        uuid:
          type: string
          format: uuid
          title: Uuid
        name:
          type: string
          title: Name
        provider:
          type: string
          title: Provider
        connection_settings:
          additionalProperties: true
          type: object
          title: Connection Settings
        configured_credentials:
          items:
            type: string
          type: array
          title: Configured Credentials
        revision:
          type: integer
          title: Revision
        is_active:
          type: boolean
          title: Is Active
      additionalProperties: false
      type: object
      required:
        - uuid
        - name
        - provider
        - connection_settings
        - configured_credentials
        - revision
        - is_active
      title: ProviderConnectionResponse
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.