> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Build AI Ecosystem

> Aihubmix introduces APP-Code, providing 10% discounts for all models for developers.

Mainly used to optimize your API call costs, a unique identifier is generated based on your valid domain name. Add this identifier to your headers for immediate effect.

* **For platforms:** All Aihubmix API call costs for the platform are reduced, but individual users do not receive discounts.
* **For developers or regular users:** All Aihubmix API calls made through your tools enjoy discounts, even if initiated by your users.

After integrating and using it, you’ll see the discounted requests reflected in your usage logs.

<img src="https://mintcdn.com/aihubmix/axGkcFk0FkcdXl5v/public/en/app-code.png?fit=max&auto=format&n=axGkcFk0FkcdXl5v&q=85&s=87414613b29f2a1f5b5fd28b0c24223c" alt="Image" width="2345" height="975" data-path="public/en/app-code.png" />

## 1️⃣ Call Method：

<CodeGroup>
  ```shell Curl Method theme={null}
  curl https://aihubmix.com/v1/responses \       
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer sk-***" \
    -H "APP-Code:***" \
    -d '{
      "model": "gpt-4o-2024-11-20",
      "input": "Hello! Please say Hello back to me."
    }'
  ```

  ```py Openai SDK Method theme={null}
  completion = client.chat.completions.create(
    extra_headers={
      "APP-Code":"***"
    },
    model="gpt-4o",
    messages=[
      {
        "role": "user",
        "content": "What is the meaning of life?"
      }
    ]
  )
  ```
</CodeGroup>

## 2️⃣ Notes

1. Gemini's header is slightly special, so add it like this:

```py Python theme={null}
    client = genai.Client(
        api_key="sk-***", # 🔑 Replace with your API key generated on AiHubMix
        http_options={
            "base_url": "https://api.aihubmix.com/gemini",
            "headers": {
                "APP-Code": "***"
            }
        },
    )
```

2. Claude native call also adds extra\_headers:

```py Python theme={null}
import os
import anthropic

client = anthropic.Anthropic(
    api_key="sk-***", # 🔑 Replace with your API key generated on AiHubMix
    base_url="https://aihubmix.com"
)

message = client.messages.create(
    extra_headers={"APP-Code":"***"},
    model="claude-3-7-sonnet-20250219",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Hello, Claude"}
    ]
)

print(message.content) 
```

## 3️⃣ Terms of Use for Discounts

By using the **APP-Code** to enjoy discounts, you agree to the following terms. **AiHubMix reserves the final interpretation rights** for all terms listed below.

<Note>
  **Open-Source Product Guidelines**

  If your product is open-source, it is sufficient to **acknowledge AiHubMix as one of the AI model providers** within the product's functionality.
  The form of acknowledgment is flexible.
</Note>

<Note>
  **Closed-Source Product Guidelines**

  If your product is closed-source, you must **explicitly mention AiHubMix as the source of model services** in the product interface, user agreement, or relevant documentation.

  Example statements:

  * "AI services powered by AiHubMix"
  * "AI services provided by AiHubMix"
  * Include related info on the product’s About page or Help section
</Note>

<Note>
  **Promotion Validity**

  The APP-Code discount is valid until **December 31, 2025**.
  Discount policies are subject to change — please stay updated via official announcements.
</Note>

***

Last updated: 2026-06-01
