API Reference

Complete API documentation for Gconv Prune

Overview

The Gconv Prune API provides comprehensive endpoints for chat interactions, user management, and advanced AI features. All API requests are made over HTTPS and return JSON.

Authentication

API Keys

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY
Security Note

Never share your API keys or commit them to version control. Use environment variables to manage keys securely.

Chat Endpoints

Send Message

POST /api/chat/send

Request Body

{
  "message": string,
  "context_id": string?,
  "model": string?,
  "stream": boolean?
}

Response

{
  "id": string,
  "response": string,
  "context_id": string,
  "created_at": string
}

Get Chat History

GET /api/chat/history

Query Parameters

{
  "context_id": string?,
  "limit": number?,
  "before": string?
}

Response

{
  "messages": [
    {
      "id": string,
      "content": string,
      "role": string,
      "created_at": string
    }
  ],
  "has_more": boolean
}

User Management

Get User Profile

GET /api/user/profile

Response

{
  "id": string,
  "email": string,
  "name": string,
  "created_at": string,
  "preferences": object
}

Update User Settings

PUT /api/user/settings

Request Body

{
  "theme": string?,
  "language": string?,
  "notifications": object?
}

Response

{
  "success": boolean,
  "settings": object
}

Error Handling

Error Responses

Error Format

{
  "error": {
    "code": string,
    "message": string,
    "details": object?
  }
}

Common Error Codes

401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded

Rate Limits

API requests are subject to rate limiting based on your subscription tier. Rate limits are applied per API key and reset hourly.

Free Tier

100 requests/hour

Pro Tier

1,000 requests/hour

Enterprise

Custom limits

Need Help?

For technical questions about our API or help with integration, check our API guides or contact our support team.