Kleap Apps API

The Apps API from Kleap — 5 operation(s) for apps.

GitHub OpenAPI

Operations 7

POST /apps Create a new app with an initial AI prompt #
GET /apps List your apps #
GET /apps/{appId} Get app details #
POST /apps/{appId}/messages Send a message to the AI for an existing app #
GET /apps/{appId}/messages Get message history for an app #
POST /apps/{appId}/wake Wake a stopped sandbox #
GET /apps/{appId}/files List files in an app #

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/kleap-co:kleap-co-apps-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

kleap-co-apps-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kleap Apps API
  version: 1.0.0
  description: 'Conversational API for building React apps with AI. Create apps, send messages, and deploy — all through chat.


    All endpoints may return `500 Internal Server Error` with the standard error format if an unexpected server error occurs.'
servers:
- url: https://kleap.co/api/v1
  description: Production
security:
- apiKey: []
tags:
- name: Apps
paths:
  /apps:
    post:
      operationId: createApp
      summary: Create a new app with an initial AI prompt
      description: Creates an app, sandbox, and sends the first message to the AI. Returns a task_id to poll for the AI response.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - prompt
              properties:
                prompt:
                  type: string
                  maxLength: 10000
                  description: The initial prompt describing what app to build
                  example: Create a landing page for a fitness app with a hero section, pricing, and contact form
                visibility:
                  type: string
                  enum:
                  - public
                  - personal
                  default: personal
                idempotency_key:
                  type: string
                  description: Unique key to prevent duplicate app creation
                webhook_url:
                  type: string
                  format: uri
                  description: URL to receive webhook when task completes
                webhook_secret:
                  type: string
                  description: Secret used to sign webhook payloads for verification
                metadata:
                  type: object
                  description: Opaque metadata to attach to the task
      responses:
        '201':
          description: App created, AI generation started
          content:
            application/json:
              schema:
                type: object
                properties:
                  task_id:
                    type: string
                  app_id:
                    type: integer
                  chat_id:
                    type: integer
                  preview_url:
                    type: string
                    nullable: true
                  poll_url:
                    type: string
                    description: URL to poll for task completion
                    example: /api/v1/tasks/{task_id}
        '400':
          description: Validation error (missing or invalid prompt)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits (requires at least 5 credits)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
    get:
      operationId: listApps
      summary: List your apps
      parameters:
      - name: limit
        in: query
        description: Maximum number of apps to return
        schema:
          type: integer
          default: 50
          maximum: 100
      - name: offset
        in: query
        description: Number of apps to skip for pagination
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: List of apps with pagination
          content:
            application/json:
              schema:
                type: object
                properties:
                  apps:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        slug:
                          type: string
                        preview_url:
                          type: string
                          nullable: true
                        production_url:
                          type: string
                          nullable: true
                        visibility:
                          type: string
                          enum:
                          - public
                          - personal
                        created_at:
                          type: string
                          format: date-time
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of apps
                      limit:
                        type: integer
                      offset:
                        type: integer
                      has_more:
                        type: boolean
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
  /apps/{appId}:
    get:
      operationId: getApp
      summary: Get app details
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: App details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  slug:
                    type: string
                  preview_url:
                    type: string
                    nullable: true
                  production_url:
                    type: string
                    nullable: true
                  visibility:
                    type: string
                    enum:
                    - public
                    - personal
                  first_turn_complete:
                    type: boolean
                    description: Whether the initial AI generation has completed
                  created_at:
                    type: string
                    format: date-time
        '400':
          description: Invalid app ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: App not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
  /apps/{appId}/messages:
    post:
      operationId: sendMessage
      summary: Send a message to the AI for an existing app
      description: Sends a chat message to the AI which will modify the app. Returns a task_id to poll.
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - message
              properties:
                message:
                  type: string
                  maxLength: 10000
                  description: The message to send to the AI
                  example: Change the hero background to blue and add a testimonials section
                idempotency_key:
                  type: string
                  description: Unique key to prevent duplicate message processing
                webhook_url:
                  type: string
                  format: uri
                  description: URL to receive webhook when task completes
                webhook_secret:
                  type: string
                  description: Secret used to sign webhook payloads for verification
                metadata:
                  type: object
                  description: Opaque metadata to attach to the task
      responses:
        '202':
          description: Message received, AI processing started
          content:
            application/json:
              schema:
                type: object
                properties:
                  task_id:
                    type: string
                  message_id:
                    type: integer
                  poll_url:
                    type: string
                    description: URL to poll for task completion
                    example: /api/v1/tasks/{task_id}
        '400':
          description: Validation error (empty message, exceeds max length, invalid JSON)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits (requires at least 2 credits)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: App not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
    get:
      operationId: getMessages
      summary: Get message history for an app
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: integer
      - name: limit
        in: query
        description: Maximum number of messages to return
        schema:
          type: integer
          default: 50
          maximum: 100
      responses:
        '200':
          description: Message history
          content:
            application/json:
              schema:
                type: object
                properties:
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        role:
                          type: string
                          enum:
                          - user
                          - assistant
                        content:
                          type: string
                        created_at:
                          type: string
                          format: date-time
        '400':
          description: Invalid app ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: App not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
  /apps/{appId}/wake:
    post:
      operationId: wakeApp
      summary: Wake a stopped sandbox
      description: Wakes up a sandbox that has been auto-stopped due to inactivity. The preview URL will be available in ~30-60 seconds.
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Sandbox is waking up
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  preview_url:
                    type: string
                    description: The preview URL (available in ~30-60 seconds)
                  message:
                    type: string
                    example: Sandbox is waking up. Preview URL will be available in ~30-60 seconds.
        '400':
          description: App has no sandbox to wake
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: App not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Failed to wake sandbox (it may have been deleted)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
  /apps/{appId}/files:
    get:
      operationId: listFiles
      summary: List files in an app
      parameters:
      - name: appId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: File listing
          content:
            application/json:
              schema:
                type: object
                properties:
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                          example: app/page.tsx
                        type:
                          type: string
                          example: file
                        updated_at:
                          type: string
                          format: date-time
                  count:
                    type: integer
                    description: Total number of files
        '400':
          description: Invalid app ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: App not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Apps
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
            details:
              type: object
              nullable: true
            request_id:
              type: string
              nullable: true
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'API key obtained from POST /api/v1/auth/keys. Pass as `Authorization: Bearer kleap_live_sk_...`'
    sessionAuth:
      type: apiKey
      in: cookie
      name: sb-access-token
      description: Supabase session cookie. Used only for API key management endpoints. Not needed for regular API usage.