Krobar.ai Templates API

Endpoints for working with reusable graph templates that can be cloned into projects

GitHub OpenAPI

Operations 6

GET /templates List Templates #
POST /templates Create Template #
GET /templates/{template_id} Get Template #
PUT /templates/{template_id} Update Template #
DELETE /templates/{template_id} Delete Template #
POST /templates/{template_id}/clone Clone Template #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/krobar-ai:krobar-ai-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

krobar-ai-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Krobar AI Templates API
  description: '# API Krobar AI


    Welcome to the Krobar AI API! A FastAPI-based service that is the backend for Krobar.ai


    ## Authentication

    **IMPORTANT**: This API requires an API key for all endpoints except for /health. The API key must be provided in the `X-API-Key` header.


    ```bash

    curl -H "X-API-Key: your-api-key" https://api.krobar.ai/endpoint

    ```'
  contact:
    name: API Support
    email: tristan@kromatic.com
  version: 1.0.0
tags:
- name: Templates
  description: Endpoints for working with reusable graph templates that can be cloned into projects
paths:
  /templates:
    get:
      tags:
      - Templates
      summary: List Templates
      description: List all available graph templates with optional filtering.
      operationId: list_templates_templates_get
      parameters:
      - name: category
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter templates by category (e.g., 'Business', 'Finance', 'Engineering')
          title: Category
        description: Filter templates by category (e.g., 'Business', 'Finance', 'Engineering')
      - name: difficulty
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter templates by difficulty level (e.g., 'Beginner', 'Intermediate', 'Advanced')
          title: Difficulty
        description: Filter templates by difficulty level (e.g., 'Beginner', 'Intermediate', 'Advanced')
      - name: tags
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Filter templates by comma-separated tags (e.g., 'forecasting,pricing,risk')
          title: Tags
        description: Filter templates by comma-separated tags (e.g., 'forecasting,pricing,risk')
      - name: search
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Search in template names and descriptions
          title: Search
        description: Search in template names and descriptions
      - name: skip
        in: query
        required: false
        schema:
          type: integer
          description: Number of templates to skip (for pagination)
          default: 0
          title: Skip
        description: Number of templates to skip (for pagination)
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          description: Maximum number of templates to return (for pagination)
          default: 100
          title: Limit
        description: Maximum number of templates to return (for pagination)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesListResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Templates
      summary: Create Template
      description: Create a new graph template (superuser only).
      operationId: create_template_templates_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphTemplateCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphTemplateResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /templates/{template_id}:
    get:
      tags:
      - Templates
      summary: Get Template
      description: Retrieve detailed information about a specific graph template.
      operationId: get_template_templates__template_id__get
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Template Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphTemplateResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Templates
      summary: Update Template
      description: Update an existing template's metadata (superuser only).
      operationId: update_template_templates__template_id__put
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Template Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphTemplateUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphTemplateResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Templates
      summary: Delete Template
      description: Delete a template (superuser only).
      operationId: delete_template_templates__template_id__delete
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Template Id
      responses:
        '204':
          description: Successful Response
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /templates/{template_id}/clone:
    post:
      tags:
      - Templates
      summary: Clone Template
      description: Clone a template into a user's project.
      operationId: clone_template_templates__template_id__clone_post
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Template Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GraphTemplateClone'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Template not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GraphTemplateSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          example: 123e4567-e89b-12d3-a456-426614174000
        graph_id:
          type: string
          format: uuid
          title: Graph Id
          example: 123e4567-e89b-12d3-a456-426614174001
        created_by:
          type: string
          format: uuid
          title: Created By
          example: 123e4567-e89b-12d3-a456-426614174002
        template_metadata:
          additionalProperties: true
          type: object
          title: Template Metadata
          example:
            category: Finance
            description: A template for discounted cash flow analysis of business value
            difficulty: Intermediate
            name: Business Valuation Model
            preview_image_url: https://example.com/images/business_valuation.png
            tags:
            - valuation
            - dcf
            - finance
        created_at:
          type: string
          format: date-time
          title: Created At
          example: '2023-06-01T15:30:45.123Z'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          example: '2023-06-02T09:15:22.456Z'
      type: object
      required:
      - id
      - graph_id
      - created_by
      - template_metadata
      - created_at
      - updated_at
      title: GraphTemplateSummary
      description: 'Schema for graph template summary.


        This model provides a condensed view of a template for list displays.'
    GraphResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        project_id:
          type: string
          format: uuid
          title: Project Id
        created_by:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Created By
        nodes:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Nodes
        edges:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Edges
        graph_metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Graph Metadata
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        updated_by:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Updated By
        version_count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Version Count
          description: Total number of versions for this graph
          example: 3
        latest_version:
          anyOf:
          - type: integer
          - type: 'null'
          title: Latest Version
          description: Latest version number for this graph
          example: 3
        time_period_unit:
          anyOf:
          - type: string
          - type: 'null'
          title: Time Period Unit
          description: Unit of time for simulation periods (e.g., 'month')
          example: month
        estimation_percentile:
          type: number
          title: Estimation Percentile
          description: Percentile used for estimation calculations
          example: 0.9
        simulation_trials:
          type: integer
          title: Simulation Trials
          description: Number of simulation trials to run
          example: 1000
        simulation_time_periods:
          type: integer
          title: Simulation Time Periods
          description: Number of time periods to simulate
          example: 12
        simulation_goal_node:
          anyOf:
          - type: string
          - type: 'null'
          title: Simulation Goal Node
          description: Node ID used as the simulation goal
          example: goal_node_id
        simulation_goal_value:
          anyOf:
          - type: number
          - type: 'null'
          title: Simulation Goal Value
          description: Value to reach for the goal node
          example: 100.0
        simulation_goal_direction:
          anyOf:
          - type: string
            enum:
            - MAXIMIZE
            - MINIMIZE
          - type: 'null'
          title: Simulation Goal Direction
          description: Direction for the simulation goal ('MAXIMIZE' or 'MINIMIZE')
          example: MAXIMIZE
        simulation_goal_time_period:
          anyOf:
          - type: integer
          - type: 'null'
          title: Simulation Goal Time Period
          description: Time period to use for goal calculation (1-based index)
          example: 12
        starting_time_period:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Starting Time Period
          description: Actual start date/time for the simulation
          example: '2025-08-01T00:00:00'
        display_timezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Display Timezone
          description: IANA timezone identifier for displaying the start time (e.g., 'America/New_York', 'Europe/London')
          example: America/New_York
        parameter_display_mode:
          type: string
          title: Parameter Display Mode
          description: How parameters are displayed in the UI
          example: estimate
        canvas_view:
          type: string
          title: Canvas View
          description: Current view mode of the canvas
          example: journey
        illustration_style:
          type: string
          title: Illustration Style
          description: Style of illustrations
          example: stick
        illustrations:
          additionalProperties:
            type: string
          type: object
          title: Illustrations
          description: Deprecated top-level illustration field retained for compatibility. Public read payloads use nodes[].illustration_urls.
          example: {}
        illustration_urls:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Illustration Urls
          description: Deprecated top-level illustration URL field retained for compatibility. Public read payloads use nodes[].illustration_urls.
          example: {}
        errors_by_element:
          anyOf:
          - additionalProperties:
              items:
                anyOf:
                - $ref: '#/components/schemas/NodeValidationResult'
                - $ref: '#/components/schemas/EdgeValidationResult'
              type: array
            type: object
          - type: 'null'
          title: Errors By Element
          description: Validation errors organized by graph element type (nodes, edges)
        errors_by_ruleset:
          anyOf:
          - additionalProperties:
              items:
                $ref: '#/components/schemas/RulesetError'
              type: array
            type: object
          - type: 'null'
          title: Errors By Ruleset
          description: Validation errors organized by ruleset
        is_valid:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Is Valid
          description: Whether the graph is valid overall
        journey_columns:
          anyOf:
          - type: integer
          - type: 'null'
          title: Journey Columns
          description: Number of journey columns for the graph
        canvas_view_filters:
          anyOf:
          - additionalProperties:
              type: boolean
            type: object
          - type: 'null'
          title: Canvas View Filters
          description: Filters for the canvas view
        tags:
          anyOf:
          - items:
              items:
                anyOf:
                - type: string
                - type: boolean
              type: array
            type: array
          - type: 'null'
          title: Tags
          description: Tags for the graph as a list of [string, boolean] pairs, e.g. [['journey', true], ['costs', true]]
          example:
          - - journey
            - true
          - - costs
            - true
        team_role:
          anyOf:
          - type: string
          - type: 'null'
          title: Team Role
          description: The user's team role for this graph (OWNER, ADMIN, MEMBER, VIEWER)
          example: MEMBER
        created_by_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By Name
          description: Name of the user who created this graph
          example: John Doe
        updated_by_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By Name
          description: Name of the user who last updated this graph
          example: Jane Smith
        client_change_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Change Id
          description: Client-supplied change ID used to correlate SSE chains to a specific local edit
        client_edit_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Edit At
          description: Client local edit timestamp (ISO) echoed back from write requests
      type: object
      required:
      - id
      - name
      - project_id
      - nodes
      - edges
      - created_at
      - updated_at
      - estimation_percentile
      - simulation_trials
      - simulation_time_periods
      - parameter_display_mode
      - canvas_view
      - illustration_style
      - illustrations
      title: GraphResponse
      description: Schema for graph response.
    GraphTemplateClone:
      properties:
        project_id:
          type: string
          format: uuid
          title: Project Id
          description: ID of the project to clone the template into
          example: 123e4567-e89b-12d3-a456-426614174003
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
          description: Optional name for the cloned graph. If not provided, the original graph name will be used.
          example: My Business Valuation Model
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Optional description for the cloned graph. If not provided, the original graph description will be used.
          example: Customized business valuation model for my project
      type: object
      required:
      - project_id
      title: GraphTemplateClone
      description: 'Schema for cloning a graph template.


        This model contains the information needed to create a new graph based on a template.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationSeverity:
      type: string
      enum:
      - error
      - warning
      - info
      title: ValidationSeverity
      description: Enum for validation error severity levels.
    ElementValidationError:
      properties:
        rule:
          type: string
          title: Rule
          description: Specific validation rule that was violated
        severity:
          $ref: '#/components/schemas/ValidationSeverity'
          description: Severity of the error (error, warning, info)
        message:
          type: string
          title: Message
          description: Human-readable error message describing the validation issue
        technical_message:
          anyOf:
          - type: string
          - type: 'null'
          title: Technical Message
          description: Technical error message with element IDs and debugging details for developers/LLM
        error_code:
          anyOf:
          - type: string
          - type: 'null'
          title: Error Code
          description: Machine-readable error code for programmatic handling
        affected_elements:
          $ref: '#/components/schemas/GraphElements'
          description: Graph elements affected by this error
        ruleset:
          type: string
          title: Ruleset
          description: Name of the ruleset that generated this error
      type: object
      required:
      - rule
      - severity
      - message
      - affected_elements
      - ruleset
      title: ElementValidationError
      description: Enhanced schema for validation errors with detailed element information.
    GraphTemplateResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          example: 123e4567-e89b-12d3-a456-426614174000
        graph_id:
          type: string
          format: uuid
          title: Graph Id
          example: 123e4567-e89b-12d3-a456-426614174001
        created_by:
          type: string
          format: uuid
          title: Created By
          example: 123e4567-e89b-12d3-a456-426614174002
        template_metadata:
          additionalProperties: true
          type: object
          title: Template Metadata
          example:
            category: Finance
            description: A template for discounted cash flow analysis of business value
            difficulty: Intermediate
            name: Business Valuation Model
            preview_image_url: https://example.com/images/business_valuation.png
            tags:
            - valuation
            - dcf
            - finance
        created_at:
          type: string
          format: date-time
          title: Created At
          example: '2023-06-01T15:30:45.123Z'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          example: '2023-06-02T09:15:22.456Z'
      type: object
      required:
      - id
      - graph_id
      - created_by
      - template_metadata
      - created_at
      - updated_at
      title: GraphTemplateResponse
      description: 'Schema for graph template response.


        This model represents a complete graph template with all its metadata and related information.'
    GraphTemplateUpdate:
      properties:
        template_metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Template Metadata
          description: Updated metadata for the template including name, category, difficulty, tags, description, preview image URL
          example:
            category: Finance
            description: An updated template for comprehensive DCF analysis
            difficulty: Advanced
            name: Updated Business Valuation Model
            preview_image_url: https://example.com/images/advanced_business_valuation.png
            tags:
            - valuation
            - dcf
            - finance
            - advanced
      type: object
      title: GraphTemplateUpdate
      description: 'Schema for updating an existing graph template.


        Contains the updated template metadata.'
    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
    EdgeValidationResult:
      properties:
        id:
          type: string
          title: Id
          description: ID of the edge with validation errors
        validation_errors:
          items:
            $ref: '#/components/schemas/ElementValidationError'
          type: array
          title: Validation Errors
          description: List of validation errors for this edge
      type: object
      required:
      - id
      - validation_errors
      title: EdgeValidationResult
      description: Schema for validation errors for a specific edge.
    GraphTemplateCreate:
      properties:
        graph_id:
          type: string
          format: uuid
          title: Graph Id
          description: ID of the graph to use as template
          example: 123e4567-e89b-12d3-a456-426614174000
        template_metadata:
          additionalProperties: true
          type: object
          title: Template Metadata
          description: Metadata for the template including name, category, difficulty, tags, description, preview image URL
          example:
            category: Finance
            description: A template for discounted cash flow analysis of business value
            difficulty: Intermediate
            name: Business Valuation Model
            preview_image_url: https://example.com/images/business_valuation.png
            tags:
            - valuation
            - dcf
            - finance
      type: object
      required:
      - graph_id
      - template_metadata
      title: GraphTemplateCreate
      description: 'Schema for creating a new graph template.


        Contains the graph ID to use as a template and the template metadata.'
    NodeValidationResult:
      properties:
        id:
          type: string
          title: Id
          description: ID of the node with validation errors
        validation_errors:
          items:
            $ref: '#/components/schemas/ElementValidationError'
          type: array
          title: Validation Errors
          description: List of validation errors for this node
      type: object
      required:
      - id
      - validation_errors
      title: NodeValidationResult
      description: Schema for validation errors for a specific node.
    GraphElements:
      properties:
        nodes:
          items:
            additionalProperties:
              type: string
            type: object
          type: array
          title: Nodes
          description: List of affected nodes with id and name pairs
        edges:
          items:
            additionalProperties:
              type: string
            type: object
          type: array
          title: Edges
          description: List of affected edges with id and name pairs
      type: object
      title: GraphElements
      description: Schema for affected graph elements in validation.
    TemplatesListResponse:
      properties:
        templates:
          items:
            $ref: '#/components/schemas/GraphTemplateSummary'
          type: array
          title: Templates
        total:
          type: integer
          title: Total
        skip:
          type: integer
          title: Skip
        limit:
          type: integer
          title: Limit
      type: object
      required:
      - templates
      - total
      - skip
      - limit
      title: TemplatesListResponse
      description: Schema for paginated templates list response.
    RulesetError:
      properties:
        rule:
          type: string
          title: Rule
          description: Specific validation rule that was violated
        severity:
          $ref: '#/components/schemas/ValidationSeverity'
          description: Severity of the error (error, warning, info)
        message:
          type: string
          title: Message
          description: Error message describing the validation issue
        affected_elements:
          $ref: '#/components/schemas/GraphElements'
          description: Graph elements affected by this error
      type: object
      required:
      - rule
      - severity
      - message
      - affected_elements
      title: RulesetError
      description: Schema for errors grouped by ruleset.
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: access_token
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key