# AI Custom Server

### Overview

AI Custom Server allows users to connect their own AI providers, self-hosted AI servers, or API-compatible AI platforms directly into the system.

Instead of being limited to built-in AI services, users can:

* Add custom AI endpoints
* Connect personal API keys
* Use private or local AI models
* Select custom AI models
* Manage multiple AI providers in one place

This feature is designed for advanced users, automation systems, businesses, and AI power users who want full control over their AI infrastructure.

***

## Supported AI Providers

The system supports popular AI providers including:

* OpenAI
* Google
* DeepSeek
* Perplexity
* Groq

Users can also connect:

* OpenAI-compatible APIs
* Self-hosted LLM servers
* Local AI gateways
* Custom AI infrastructures

***

## Core Features

### 1. Connect Your Own AI API Key

Users can securely connect personal AI API keys directly to the platform.

#### Benefits

* Use your own AI quota
* Full control over billing
* Better privacy
* Access premium models
* Avoid shared rate limits

API keys are securely encrypted on the server side. &#x20;

***

### 2. Custom AI Endpoint Support

AI Custom Server supports custom API endpoints.

Users can connect:

* Self-hosted AI servers
* Local LLM deployments
* Reverse proxy AI endpoints
* OpenAI-compatible APIs

#### Example

```
https://your-ai-server.com/v1
```

This makes the system flexible for:

* Companies
* Developers
* AI enthusiasts
* Private infrastructures

***

## Multi-Model Support

Users can browse and select available AI models from connected servers.

#### Examples

* GPT-4o
* Llama 3
* DeepSeek
* Custom fine-tuned models
* OCR models

The system automatically syncs supported models from the connected endpoint when available. &#x20;

***

## AI Task Integration

AI Custom Server can be connected directly to automation tasks.

Supported capabilities include:

* AI message rewriting
* Summarization
* Translation
* OCR processing
* AI filtering
* AI formatting
* Caption generation

Each task can use:

* Different AI providers
* Different models
* Different prompts
* Different OCR settings

***

## OCR AI Support

The system also supports OCR-enabled AI workflows.

Users can:

* Extract text from images
* Process screenshots
* Read media captions
* Append OCR results automatically

OCR output modes include:

* Prepend to caption
* Append to caption
* Replace caption entirely

***

## Smart Model Catalog Sync

The system can automatically:

* Detect available models
* Refresh model catalogs
* Sync supported capabilities
* Update model availability

For unsupported endpoints, users can manually configure custom models. &#x20;

***

## Advanced Security & Validation

AI Custom Server includes:

* API key validation
* Duplicate key detection
* Ownership verification
* Secure encryption
* Unsafe endpoint protection

The platform also validates:

* Connected models
* Provider compatibility
* Endpoint readiness

***

## Flexible Infrastructure

This feature is ideal for users who want:

* Full AI control
* Better scalability
* Private AI infrastructure
* Lower AI costs
* Custom AI workflows
* Advanced automation systems

***

## Use Cases

### Telegram Automation

Use AI to rewrite, clean, translate, or summarize forwarded messages automatically.

### Private AI Infrastructure

Connect self-hosted AI servers for internal usage.

### AI-Powered OCR

Extract and process text from images automatically.

### Multi-Provider AI System

Manage multiple AI providers from one dashboard.

### Enterprise Automation

Integrate AI into advanced workflows and large-scale automation systems.

***

## Summary

AI Custom Server transforms the platform into a fully customizable AI automation ecosystem.

Key advantages:

* Connect your own AI servers
* Use personal API keys
* Support multiple AI providers
* Select custom AI models
* OCR integration
* Advanced task automation
* Secure and scalable infrastructure

This feature is built for users who need flexibility, performance, and complete control over their AI workflows.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v2.autoforwardtelegram.com/modify-content/ai-mode/ai-custom-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
