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

# Register a registry

> Discovers a registry from its base URL: fetches its well-known document, negotiates the highest supported definitions/modules capability, and stores a record. The advertised id is used unless an explicit id override is supplied. The base URL is validated and normalized before storage. When auth credentials are supplied, the well-known auth advertisement is validated first: safety refusals (plaintext transport, method mismatch, a requested oauth2 scope the registry does not advertise) fail the request with 400, while a failed live token exchange still stores the record and reports error status on the auth field.



## OpenAPI

````yaml /openapi.json post /registries
openapi: 3.0.0
info:
  title: Cyrnel API
  description: >-
    Cyrnel is a universal layer that connects AI agents and LLM applications to
    any external service, API, or device regardless of protocol or standard. It
    acts as an adaptive bridge between your AI and the outside world, enabling
    seamless integrations through code execution, async operation handling, and
    built-in observability and security controls.
  version: 1.0.0
servers:
  - url: http://localhost:9371
security: []
paths:
  /registries:
    post:
      tags:
        - Registries
      summary: Register a registry
      description: >-
        Discovers a registry from its base URL: fetches its well-known document,
        negotiates the highest supported definitions/modules capability, and
        stores a record. The advertised id is used unless an explicit id
        override is supplied. The base URL is validated and normalized before
        storage. When auth credentials are supplied, the well-known auth
        advertisement is validated first: safety refusals (plaintext transport,
        method mismatch, a requested oauth2 scope the registry does not
        advertise) fail the request with 400, while a failed live token exchange
        still stores the record and reports error status on the auth field.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddRegistryRequest'
      responses:
        '201':
          description: The registry record was created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryCreatedResponse'
        '400':
          description: >-
            The request body was invalid, or the registry's well-known document
            is malformed or advertises no supported capability.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '401':
          description: A bearer token was required but missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '409':
          description: A registry already exists with the requested id or base URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '429':
          description: >-
            Rate limit exceeded. The request was throttled. Check Retry-After
            header.
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
              description: Maximum requests allowed in the current window.
            X-RateLimit-Remaining:
              schema:
                type: integer
              description: Requests remaining in the current window.
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Unix timestamp when the window resets.
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitErrorResponse'
        '500':
          description: The registry could not be created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '502':
          description: The registry could not be reached or returned a non-2xx response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    AddRegistryRequest:
      type: object
      properties:
        baseUrl:
          type: string
          minLength: 1
          description: >-
            Absolute http(s) URL of the registry. A well-known discovery
            document is fetched from it; the URL is normalized before storage.
        id:
          type: string
          minLength: 1
          description: >-
            Optional local id override. When omitted, the id advertised by the
            registry's well-known document is used.
        auth:
          allOf:
            - $ref: '#/components/schemas/RegistryAuthSetup'
            - description: >-
                Optional credentials for the registry, validated against its
                well-known auth advertisement before storage.
      required:
        - baseUrl
      description: Request body used to register a registry via discovery.
    RegistryCreatedResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          description: Registry slug matching /^[A-Za-z0-9_-]+$/ used as the primary key.
        baseUrl:
          type: string
          description: Normalized absolute http(s) URL of the registry.
        lastSyncedAt:
          type: string
          nullable: true
          description: >-
            ISO-8601 timestamp of the last successful sync with the registry, or
            null when it has never been synced.
        createdAt:
          type: string
          description: ISO-8601 timestamp of when the registry was registered.
        updatedAt:
          type: string
          description: ISO-8601 timestamp of the last mutation to the record.
        authType:
          type: string
          nullable: true
          enum:
            - apiKey
            - oauth2
            - null
          description: >-
            Authentication method configured for this registry, or null when
            none is set.
        tokenExpiresAt:
          type: number
          nullable: true
          description: >-
            Epoch-ms timestamp when the cached OAuth2 access token expires, or
            null for api key auth or when no token has been fetched.
        auth:
          type: object
          nullable: true
          properties:
            type:
              type: string
              enum:
                - apiKey
                - oauth2
            status:
              type: string
              enum:
                - configured
                - error
              description: >-
                configured when credentials were successfully stored; error when
                storage or validation failed.
            headerName:
              type: string
              nullable: true
              description: >-
                Header the api key is sent in, when the registry advertises api
                key auth.
            tokenExpiresAt:
              type: number
              nullable: true
              description: >-
                Epoch-ms timestamp when the fetched access token expires, when
                the registry advertises oauth2.
            message:
              type: string
              nullable: true
              description: Human-readable detail when status is error.
          required:
            - type
            - status
          description: >-
            Outcome of storing the credentials supplied in the request, or null
            when no auth was supplied.
      required:
        - id
        - baseUrl
        - lastSyncedAt
        - createdAt
        - updatedAt
        - authType
        - tokenExpiresAt
      description: Response body of a registry registration request.
    ApiErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message returned by the API.
        code:
          type: string
          description: >-
            Stable machine-readable error code (e.g. invalid_cursor,
            cursor_expired).
      required:
        - error
      description: Standard error envelope returned by the HTTP error middleware.
    RateLimitErrorResponse:
      type: object
      properties:
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: Error code identifying rate-limit rejection.
        message:
          type: string
          description: Human-readable message with retry instructions.
        retryAfter:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Number of seconds to wait before retrying.
      required:
        - error
        - message
        - retryAfter
      description: Error body returned when a request is rate-limited (HTTP 429).
    RegistryAuthSetup:
      oneOf:
        - $ref: '#/components/schemas/ApiKeyAuthSetup'
        - $ref: '#/components/schemas/OAuthAuthSetup'
      discriminator:
        propertyName: type
        mapping:
          apiKey:
            $ref: '#/components/schemas/ApiKeyAuthSetup'
          oauth2:
            $ref: '#/components/schemas/OAuthAuthSetup'
      description: >-
        Credentials used when the server talks to the registry. The token
        endpoint (oauth2) and header name (apiKey) always come from the
        registry's well-known advertisement, never from this request.
    ApiKeyAuthSetup:
      type: object
      properties:
        type:
          type: string
          enum:
            - apiKey
          description: API key authentication; the key is sent in a fixed header.
        apiKey:
          type: string
          minLength: 1
          description: >-
            API key sent in the header named by the registry's well-known auth
            advertisement.
      required:
        - type
        - apiKey
      description: API key credentials for a registry.
    OAuthAuthSetup:
      type: object
      properties:
        type:
          type: string
          enum:
            - oauth2
          description: OAuth2 client-credentials authentication.
        clientId:
          type: string
          minLength: 1
          description: OAuth2 client id.
        clientSecret:
          type: string
          minLength: 1
          description: OAuth2 client secret.
        scopes:
          type: array
          items:
            type: string
            minLength: 1
          description: >-
            Optional requested scopes; each must be one of the scopes advertised
            by the registry. Defaults to all advertised scopes when omitted.
      required:
        - type
        - clientId
        - clientSecret
      description: OAuth2 client-credentials for a registry.

````