Skip to content
XXD VPS Guide
中文
  1. How-to
  2. AI API
  3. Add accounts to CLIProxyAPI

Add accounts to CLIProxyAPI

5 minutesFor: People who want their own AI APIMain guide step 6: Use your own AI API

A fresh CLIProxyAPI has no accounts — add your own first. Two ways:

Option 1: log in with your account (OAuth)

For people with a subscription such as ChatGPT (Codex) or Claude.

  1. Log in to the management center and open the OAuth login section (under Auth files & OAuth).
  2. Choose the service (such as Codex or Claude) and start the login.
  3. The browser opens that service’s authorization page — log in and approve.
  4. If the browser then lands on a localhost address that won’t load, don’t close it: follow the management center’s prompt and paste the full URL from the address bar back into it.
  5. Back on the auth files list, the new entry appears.

Option 2: enter an API key

For people with an API key from an AI service.

  1. Log in to the management center and open AI providers.
  2. Choose the service (or an OpenAI-compatible provider), add it, paste the API key and save.

Check

Run in the terminal (with your API address and API key):

List available models
curl -s https://your-IP:8318/v1/models -H "Authorization: Bearer your-API-Key"

You should see

Model names appear in the response — the account is added.

Don't do this

Add only your own accounts, never other people’s, and don’t share the API. Quota runs out fast and it may break the AI services’ terms of use.

Stuck?

After a while, calls fail saying authorization expired?

Subscription authorizations expire or get revoked. Check the status in the auth files list and run the OAuth login again if needed.

This setup is for you and your family only. Follow local laws and each site's and AI tool's terms of use. Open source (MIT) — code and feedback on GitHub.