Introduction
APIPHON provides a REST API that allows you to interact with the gateway service programmatically. The API follows an OpenAI-compatible format, making it easy to integrate with existing tools and libraries that support the OpenAI API standard.Base URL
The API is accessible at:{host} is either:
127.0.0.1(localhost only)- Your LAN IP address (when configured for network access)
Authentication
All API requests require authentication using a Bearer token in theAuthorization header.
API Format Compatibility
APIPHON implements an OpenAI-style API format, specifically compatible with the/v1/chat/completions endpoint. This means you can use APITHON as a drop-in replacement for OpenAI’s API in many applications.
Available Endpoints
APIPHON currently provides one main endpoint:Chat Completions
Send messages and receive AI-generated responses
Endpoint Summary
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/chat/completions | Send chat messages and receive completions |
Response Format
All successful API responses return JSON with a standard structure:Error Responses
When an error occurs, the API returns an appropriate HTTP status code along with an error message:401 Unauthorized
Returned when the authentication token is missing or invalid:- Missing
Authorizationheader - Incorrect Bearer token
- Malformed authentication header
Error Response Structure
| Status Code | Description |
|---|---|
| 401 | Unauthorized - Invalid or missing API key |
| 400 | Bad Request - Invalid request format |
| 500 | Internal Server Error - Server-side error |
Getting Started
To get started with the APITHON API:- Ensure the APITHON gateway is running
- Note the host IP address and port (default: 5000)
- Use the API key:
UnHackerEnCapital - Make requests to
/v1/chat/completions
Example Request
Here’s a quick example of making a request to the API:Next Steps
Chat Completions
Learn how to send messages and receive responses
Authentication
Understand API authentication requirements