Escape AI Chats API

Copilot chats. Create, list and resume Copilot chats. Only the chats owned by the authenticated user are exposed.

Operations 5

GET /ai-chats List Copilot chats #
POST /ai-chats Create a Copilot chat #
GET /ai-chats/{chatId} Get a Copilot chat #
GET /ai-chats/{chatId}/messages List Copilot chat messages #
POST /ai-chats/{chatId}/messages Send a Copilot chat message #

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/escape:escape-aichats-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

escape-aichats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 3.0.0
  title: Escape Public AI Chats API
  description: 'This API enables you to operate Escape programmatically.


    All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header.

    For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`.


    You can find your API key in the Escape dashboard.'
servers:
- url: https://public.escape.tech/v3
security:
- apiKey: []
tags:
- name: AIChats
  description: 'Copilot chats.


    Create, list and resume Copilot chats. Only the chats owned by the authenticated user are exposed.'
paths:
  /ai-chats:
    get:
      tags:
      - AIChats
      summary: List Copilot chats
      operationId: listAIChats
      description: List the Copilot chats of the authenticated user, most recent first, with cursor pagination. Only the chats owned by the caller are returned.
      parameters:
      - schema:
          type: string
          description: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page is returned.
          example: 00000000-0000-0000-0000-000000000000
        required: false
        description: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page is returned.
        name: cursor
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
          description: The number of items to return per page
          example: 50
        required: false
        description: The number of items to return per page
        name: size
        in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  nextCursor:
                    type:
                    - string
                    - 'null'
                  totalCount:
                    type: integer
                    default: 100
                    example: 20
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: The id of the chat
                        title:
                          type: string
                          description: The title of the chat
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the chat was created
                      required:
                      - id
                      - title
                      - createdAt
                      title: AIChatSummary
                      description: A Copilot chat owned by the authenticated user. Internal and agentic chats are never exposed.
                required:
                - nextCursor
                - data
        '400':
          description: Pagination error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Invalid cursor
                    - Branch filters page limit reached
                  details:
                    type: string
                required:
                - message
                - details
                title: PaginationError
                description: Returned when an invalid pagination cursor is supplied or when the branch filters page limit is reached
    post:
      tags:
      - AIChats
      summary: Create a Copilot chat
      operationId: createAIChat
      description: Create a Copilot chat for the authenticated user. The organization is resolved from the API key and is never taken from the request body. Chats are always created as non-internal.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                  maxLength: 256
                  description: The title of the chat
                  example: Investigate the login flow
                template:
                  type: string
                  enum:
                  - COPILOT
                  - DEFAULT
                  description: The chat template to use. Defaults to COPILOT.
              required:
              - title
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The id of the chat
                  title:
                    type: string
                    description: The title of the chat
                  createdAt:
                    type: string
                    format: date-time
                    description: The date and time the chat was created
                required:
                - id
                - title
                - createdAt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Bad Request
                  details:
                    type: string
                required:
                - message
                - details
                title: BadRequest
                description: Returned when the request payload fails validation
  /ai-chats/{chatId}:
    get:
      tags:
      - AIChats
      summary: Get a Copilot chat
      operationId: getAIChat
      description: Get a Copilot chat owned by the authenticated user together with a preview of its message history (up to 100 messages, oldest first). Use `messagesTotalCount` to detect a truncated preview and GET /v3/ai-chats/{chatId}/messages to page through the full history.
      parameters:
      - schema:
          type: string
          format: uuid
          description: The chat ID
          example: 00000000-0000-0000-0000-000000000000
        required: true
        description: The chat ID
        name: chatId
        in: path
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The id of the chat
                  title:
                    type: string
                    description: The title of the chat
                  createdAt:
                    type: string
                    format: date-time
                    description: The date and time the chat was created
                  messages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: The id of the message
                        role:
                          type: string
                          enum:
                          - ASSISTANT
                          - SYSTEM
                          - TOOL
                          - USER
                          description: The role of the message author
                        content:
                          type: string
                          description: The message content
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the message was created
                      required:
                      - id
                      - role
                      - content
                      - createdAt
                      title: AIChatMessage
                      description: A single message of a Copilot chat.
                    description: The messages of the chat, oldest first (up to 100 messages)
                  messagesTotalCount:
                    type: integer
                    description: The total number of messages in the chat. When it is greater than the length of `messages`, the preview is truncated and the full history is available on the paginated messages endpoint.
                required:
                - id
                - title
                - createdAt
                - messages
                - messagesTotalCount
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Not found
                required:
                - message
                title: NotFound
                description: Returned when the requested resource does not exist
  /ai-chats/{chatId}/messages:
    get:
      tags:
      - AIChats
      summary: List Copilot chat messages
      operationId: listAIChatMessages
      description: List the messages of a Copilot chat owned by the authenticated user, oldest first, with cursor pagination.
      parameters:
      - schema:
          type: string
          format: uuid
          description: The chat ID
          example: 00000000-0000-0000-0000-000000000000
        required: true
        description: The chat ID
        name: chatId
        in: path
      - schema:
          type: string
          description: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page is returned.
          example: 00000000-0000-0000-0000-000000000000
        required: false
        description: The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page is returned.
        name: cursor
        in: query
      - schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
          description: The number of items to return per page
          example: 50
        required: false
        description: The number of items to return per page
        name: size
        in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  nextCursor:
                    type:
                    - string
                    - 'null'
                  totalCount:
                    type: integer
                    default: 100
                    example: 20
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: The id of the message
                        role:
                          type: string
                          enum:
                          - ASSISTANT
                          - SYSTEM
                          - TOOL
                          - USER
                          description: The role of the message author
                        content:
                          type: string
                          description: The message content
                        createdAt:
                          type: string
                          format: date-time
                          description: The date and time the message was created
                      required:
                      - id
                      - role
                      - content
                      - createdAt
                      title: AIChatMessage
                      description: A single message of a Copilot chat.
                required:
                - nextCursor
                - data
        '400':
          description: Pagination error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Invalid cursor
                    - Branch filters page limit reached
                  details:
                    type: string
                required:
                - message
                - details
                title: PaginationError
                description: Returned when an invalid pagination cursor is supplied or when the branch filters page limit is reached
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Not found
                required:
                - message
                title: NotFound
                description: Returned when the requested resource does not exist
    post:
      tags:
      - AIChats
      summary: Send a Copilot chat message
      operationId: createAIChatMessage
      description: Append a user message to a Copilot chat owned by the authenticated user and return the assistant reply.
      parameters:
      - schema:
          type: string
          format: uuid
          description: The chat ID
          example: 00000000-0000-0000-0000-000000000000
        required: true
        description: The chat ID
        name: chatId
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  minLength: 1
                  maxLength: 2000000
                  description: The content of the user message
                template:
                  type: string
                  enum:
                  - COPILOT
                  - DEFAULT
                  description: The chat template to use. Defaults to COPILOT.
              required:
              - content
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The id of the message
                  role:
                    type: string
                    enum:
                    - ASSISTANT
                    - SYSTEM
                    - TOOL
                    - USER
                    description: The role of the message author
                  content:
                    type: string
                    description: The message content
                  createdAt:
                    type: string
                    format: date-time
                    description: The date and time the message was created
                required:
                - id
                - role
                - content
                - createdAt
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Bad Request
                  details:
                    type: string
                required:
                - message
                - details
                title: BadRequest
                description: Returned when the request payload fails validation
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - Not found
                required:
                - message
                title: NotFound
                description: Returned when the requested resource does not exist
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-ESCAPE-API-KEY