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

# Create iframe link

> Creates a secure iframe link with a cached JWT token.



## OpenAPI

````yaml https://api.camelai.com/api/schema/ post /api/v1/iframe/create
openapi: 3.0.3
info:
  title: camelAI API
  version: 1.0.0 (v1)
  description: API for camelAI - AI-powered data analytics platform
servers:
  - url: https://api.camelai.com
    description: camelAI API server
security: []
paths:
  /api/v1/iframe/create:
    post:
      tags:
        - iframe
      summary: Create iframe link
      description: Creates a secure iframe link with a cached JWT token.
      operationId: iframe_create_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateIframeLinkRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateIframeLinkResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IframeErrorResponse'
          description: ''
      security:
        - ApiKeyAuth: []
        - {}
components:
  schemas:
    CreateIframeLinkRequestRequest:
      type: object
      properties:
        uid:
          type: string
          minLength: 1
          description: >-
            User identifier: The UID of the user to create the iframe for. This
            is used to track usage and thread history. This can be anything you
            want, but it must be unique. We recommend using a user ID or email.
        srcs:
          type: array
          items:
            type: string
            minLength: 1
          description: >-
            List of Source/Connection IDs: The IDs of the sources/connections to
            use for the iframe. This is used to determine which
            sources/connections the user will have access to in the chat.
        ttl:
          type: integer
          maximum: 3600
          minimum: 60
          default: 900
          description: 'Token lifetime in seconds (60-3600, default: 900)'
        knowledge_base_entries:
          type: array
          items:
            type: string
            minLength: 1
          description: >-
            Array of session-specific (stateless) knowledge base entries. These
            temporary entries apply only to this iframe instance and do not
            persist. They work alongside any persistent (stateful) entries
            previously created through /api/v1/knowledge-base/ for your
            connection IDs.
        reference_queries:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
              minLength: 1
            description: Reference query object with title and query
          description: >-
            Array of session-specific (stateless) reference query objects (e.g.,
            {"title": "...", "query": "..."}). These temporary queries apply
            only to this iframe instance and do not persist. They work alongside
            any persistent (stateful) queries previously created through
            /api/v1/reference-queries/ for your connection IDs.
        model:
          enum:
            - o3
            - o4-mini
            - gpt-4.1
            - gpt-5
            - gpt-5-codex
            - sonnet-4
            - sonnet-4.5
            - haiku-4.5
          type: string
          x-spec-enum-id: 4009949c89248c2b
          default: gpt-5
          description: |-
            Model to use for generated threads

            * `o3` - o3
            * `o4-mini` - o4-mini
            * `gpt-4.1` - gpt-4.1
            * `gpt-5` - gpt-5
            * `gpt-5-codex` - gpt-5-codex
            * `sonnet-4` - sonnet-4
            * `sonnet-4.5` - sonnet-4.5
            * `haiku-4.5` - haiku-4.5
        response_mode:
          enum:
            - full
            - basic
          type: string
          x-spec-enum-id: 9e1f305c712ed25a
          default: full
          description: >-
            Deprecated fallback. Prefer configuring response mode on the theme;
            this request parameter is only used if the theme is missing a
            response_mode.


            * `full` - full

            * `basic` - basic
        theme:
          type: object
          additionalProperties:
            type: string
          description: >-
            Theme configuration to apply to the iframe (theme_mode,
            custom_css_vars, start_message)
        theme_id:
          type: integer
          description: ID of the theme to apply (mutually exclusive with theme)
        show_sidebar:
          type: boolean
          default: true
          description: >-
            Deprecated fallback. Prefer configuring sidebar visibility on the
            theme; this request parameter is only used if the theme is missing a
            show_sidebar value.
        show_dashboards:
          type: boolean
          default: true
          description: >-
            Deprecated fallback. Prefer configuring dashboard visibility on the
            theme; this request parameter is only used if the theme is missing a
            show_dashboards value.
        limits:
          allOf:
            - $ref: '#/components/schemas/IframeRateLimitsRequest'
          description: Optional per-uid rate limits
      required:
        - srcs
        - uid
    CreateIframeLinkResponse:
      type: object
      properties:
        iframe_url:
          type: string
          description: URL for the iframe view
        cache_key:
          type: string
          description: Cache key for JWT retrieval
        expires_in:
          type: integer
          description: Token lifetime in seconds
      required:
        - cache_key
        - expires_in
        - iframe_url
    IframeErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
    IframeRateLimitsRequest:
      type: object
      properties:
        hourly:
          type: integer
          minimum: 1
          description: Max messages per hour for this uid
        daily:
          type: integer
          minimum: 1
          description: Max messages per day for this uid
        weekly:
          type: integer
          minimum: 1
          description: Max messages per week for this uid
        monthly:
          type: integer
          minimum: 1
          description: Max messages per month for this uid
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: API key authentication using Bearer scheme

````