API

Table of contents

  1. API
    1. Overview
    2. HTTP API
      1. Endpoints
      2. Example
    3. Quick Links
    4. Next Steps

chat.nvim provides APIs for external integration and automation.

Overview

chat.nvim offers HTTP API for external applications to interact with your chat sessions:

  • HTTP Server: Built-in server for receiving messages
  • Session Management: List and preview sessions via API
  • External Integration: Connect scripts, CI/CD, monitoring tools

HTTP API

The HTTP API allows external applications to send messages to chat.nvim:

Endpoints

Endpoint Method Description
/ POST Send message to a session
/sessions GET Get list of active session IDs
/session GET Get HTML preview of a session

Example

curl -X POST http://127.0.0.1:7777/ \
  -H "X-API-Key: your-secret-key" \
  -H "Content-Type: application/json" \
  -d '{"session": "my-session", "content": "Hello from curl!"}'

Learn more: HTTP API


  • HTTP API - Complete HTTP API documentation

Next Steps


Table of contents