TextLayer Core API
TextLayer Core provides a comprehensive API for building AI-powered applications. This API reference documents the available endpoints, request formats, and response structures.API Overview
TextLayer Core’s API follows RESTful principles and is designed to be easy to integrate with any application. The API enables you to:- Send messages to LLMs through chat endpoints
- Receive streaming responses for real-time interactions
- Check system health and status
- Retrieve available models
Available Endpoints
TextLayer Core provides several endpoints for different functionalities. For detailed information about specific endpoints and their request/response formats, explore the individual endpoint documentation in this section.Message Format
When sending messages to the chat endpoints, use the following format:user: Messages from the end userassistant: Messages from the AI assistantsystem: System instructions that guide the assistant’s behavior
Response Format
All TextLayer Core API responses follow a consistent format:status: HTTP status code (e.g., 200 for success, 400 for bad request)payload: The actual response data, which varies by endpointcorrelation_id: A unique identifier for tracking the request