Skip to content
BrushLLM

Documentation

API setup and examples

Create a key, set your client’s API address and choose a model. Follow the steps below or use the examples in four languages.

  1. 1

    Get an API key

    Create an account or sign in to the console and create a key. Replace the example brsh-… with your actual key and keep it private.

  2. 2

    Set the base URL and key

    Set the address in a client that supports OpenAI-compatible requests:

    base_url

    https://api.brushllm.com/v1
  3. 3

    Enter the model ID

    Pass a model ID from the table as the model parameter. IDs are case-sensitive.

Send a request

Examples in cURL, Python, Node.js and Go. Replace the key and check parameters for your chosen model.

        curl https://api.brushllm.com/v1/chat/completions \
  -H "Authorization: Bearer $BRUSH_LLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-chat",
    "messages": [
      {"role": "user", "content": "Say hello in three languages."}
    ]
  }'
      

Model ids

Use these exact ids (case-sensitive). See the models page for descriptions and capabilities. Image models are called via POST /v1/images/generations with the same API key.

Model idDisplay nameContext
gpt-5.2GPT-5.2391K
gpt-5.2-miniGPT-5.2 mini391K
deepseek-chatDeepSeek-V3.2128K
deepseek-reasonerDeepSeek-R1128K
glm-4.6GLM-4.6200K
glm-4.5-airGLM-4.5 Air128K
glm-4.5-flashGLM-4.5 Flash128K
qwen3-maxQwen3-Max256K
qwen3-235b-a22bQwen3 235B A22B256K
qwen3-32bQwen3 32B128K
qwen3-coder-plusQwen3 Coder Plus256K
qwen-vl-maxQwen VL Max128K
kimi-k2-0905Kimi K2 (0905)256K
kimi-k2-thinkingKimi K2 Thinking256K
MiniMax-M2MiniMax-M2200K
gpt-image-2GPT-Image-2—

Errors

StatusMeaningWhat to do
401Invalid or missing API keyCheck that the request includes a valid key that has not been disabled.
404Unknown model idCheck the model ID spelling and letter case.
429Rate limit or quota exceededWait and retry with backoff, or raise the quota for this key in the console.
402Insufficient balanceTop up your account in the console and retry the request.
5xxUpstream provider errorRetry later. If it keeps failing, keep the request ID and contact support.

Stuck on something?

Manage keys, limits and bills in the console. For other questions, email [email protected].

Open the console