Skip to content
AstrBot
Main Navigation HomeBlogRoadmapHTTP API

English

简体中文

English

简体中文

Toggle dark mode

Intro & DeployMessaging PlatformsAI IntegrationUsageDevelopment
Sidebar Navigation

Introduction

What is AstrBot

Community

FAQ

Deployment

Package Manager

One-click Launcher

Docker

Kubernetes

BT Panel

1Panel

Manual

Other Deployments

CasaOS

Compshare GPU

Community-provided Deployment

Support Us

Messaging Platforms

Quick Start

QQ Official Bot

Webhook Method

Websockets Method

WeCom Application

WeCom AI Bot

WeChat Official Account

Lark

DingTalk

Telegram

LINE

Slack

Misskey

Discord

OneBot v11

NapCat

Lagrange

Other Clients

Satori

Using LLOneBot

Using server-satori

Community-provided

Matrix

KOOK

VoceChat

AI Integration

✨ Model Providers

NewAPI

AIHubMix

PPIO Cloud

SiliconFlow

TokenPony

302.AI

Ollama

LMStudio

⚙️ Agent Runners

Built-in Agent Runner

Dify

Coze

Alibaba Bailian

Usage

WebUI

Plugins

Built-in Commands

Tool Use

Anthropic Skills

SubAgent Orchestration

Proactive Tasks

MCP

Web Search

Knowledge Base

Custom Rules

Agent Runner

Unified Webhook Mode

Auto Context Compression

Agent Sandbox

Development

Plugin Development

🌠 Getting Started

Minimal Example

Listen to Message Events

Send Messages

Plugin Configuration

AI

Storage

HTML to Image

Session Control

Publish Plugin

Platform Adapter Integration

AstrBot HTTP API

AstrBot Configuration File

Others

Self-hosted HTML to Image

Open Source Summer

OSPP 2025

On this page

Connecting Model Services ​

AstrBot supports the native API formats of OpenAI, Google GenAI, and Anthropic. You can connect any model service provider that conforms to one of these three API formats.

NOTE

If you are located in mainland China, we strongly recommend using official model providers or compliant providers that follow local laws and regulations, for example:

  • MoonshotAI
  • GLM
  • MiniMax
  • Qwen
  • DeepSeek

These providers support the OpenAI API format. You can find the API Base URL and API Key from their documentation and fill them into AstrBot provider settings.

Please note that using non-compliant third-party model services may introduce availability, privacy, or legal risks. For details, see the EULA.

For example, you may choose to connect model services provided by (but not limited to):

  • Official OpenAI model services (OpenAI)
  • Official Anthropic model services (Anthropic)
  • Google's Gemini model services via Google Cloud (Google Cloud)
  • OpenRouter model services (OpenRouter)

Integration Steps Using DeepSeek as an Example ​

Using DeepSeek as an example, assuming you have registered and logged in to a DeepSeek account, the steps to connect are:

  1. Go to the DeepSeek Console (https://platform.deepseek.com/).
  2. Click the "API Keys" menu in the left sidebar, create a new API Key, and copy the key.
  3. Click the "API Documentation" link near the bottom of the left sidebar to open the API documentation page.
  4. On the API documentation page, find the section about the "OpenAI-compatible interface" and note the API Base URL, for example https://api.deepseek.com/v1. (If there is no /v1, please add /v1.)
  5. Open the AstrBot Console -> Service Providers page, click Add Provider, find and click OpenAI (if the provider type you want to connect is listed, prefer clicking that type; for some providers like DeepSeek we provide optimized adapter support). Paste the API Key into the API Key field of the form and paste the API Base URL into the API Base URL field.
  6. Click Get Model List, find the model you want to use, click the + button on the right, then toggle the switch that appears on the right to enable it.
  7. Go to the Configuration page, find the conversational model, click the selection button on the right, choose the provider and model you just added, then click the Save Configuration button at the bottom-right of the screen.

Using Environment Variables to Load Keys ​

Introduced in v4.13.0.

You can use environment variables to load provider API keys. In the provider configuration page, set the API Key field to $ENV_VARIABLE_NAME, for example: $DEESEEK_API_KEY.

Edit this page on GitHub

Last updated:

Pager
PreviousVoceChat
NextNewAPI

Deployed on Rainyun Logo