# AuAPIs Developer Documentation

Welcome to AuAPIs. We provide developers and businesses with an OpenAI-compatible API gateway for accessing multiple AI model routes through one unified interface.

***

### 🛠️ 1. Base URL

When using OpenAI-compatible SDKs, set the Base URL to:

`[https://www.auapis.com/v1](https://www.auapis.com/v1)`

Example Endpoint:

`POST [https://www.auapis.com/v1/chat/completions](https://www.auapis.com/v1/chat/completions)`

***

### 🔑 2. Authentication

All requests must include your API Key in the Authorization header. You can create and manage your keys in the [API Keys](https://gemini.google.com/app/31210fde8644424f) section of your console.

HTTP

```
Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxx
Content-Type: application/json
```

***

### 🤖 3. Supported Models

Use the following model names in the `model` parameter when calling compatible endpoints.

#### 🔹 OpenAI-Compatible Text Models

*General chat, writing, reasoning, and coding tasks.*

| **Model** | **Description**                                                                              |
| --------- | -------------------------------------------------------------------------------------------- |
| gpt-5.4   | Platform model alias. Suitable for daily chat, text processing, and general reasoning tasks. |
| gpt-5.5   | Platform model alias. Stronger reasoning, coding, and complex task handling capability.      |

#### 🔹 DeepSeek Models

*Cost-effective models for fast response and reasoning tasks.*

| **Model**         | **Description**                                                                           |
| ----------------- | ----------------------------------------------------------------------------------------- |
| deepseek-v4-flash | Fast response model, suitable for high-concurrency and lightweight text tasks.            |
| deepseek-v4-pro   | Stronger reasoning model, suitable for complex logic, analysis, and long-context parsing. |

#### 🔹 Compatible Coding Routes

*Coding-focused routes for software development and complex system tasks.*

| **Model**             | **Description**                                                                      |
| --------------------- | ------------------------------------------------------------------------------------ |
| Kiro-Coder-opus-4-6   | High-performance coding route for complex architecture and advanced code generation. |
| Kiro-Coder-sonnet-4-6 | Balanced coding route with strong performance and speed. Suitable for heavy coding.  |
| Kiro-Coder-haiku-4-5  | Low-latency coding route for real-time interaction and lightweight development.      |

#### 🔹 Image and Vision Models

| **Model**   | **Description**                                                                            |
| ----------- | ------------------------------------------------------------------------------------------ |
| gpt-image-2 | Supports image generation and vision-related capabilities depending on the selected route. |

***

### 💻 4. Quick Start (Python)

Install the SDK:

Bash

```
pip install openai
```

Implementation:

Python

```
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://www.auapis.com/v1"
)

response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[
        {"role": "system", "content": "You are a senior system architect."},
        {"role": "user", "content": "Explain the core advantages of microservices architecture."}
    ],
    stream=False
)

print(response.choices[0].message.content)
```

***

### 📡 5. cURL Example

Bash

```
curl https://www.auapis.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant."
      },
      {
        "role": "user",
        "content": "Hello, introduce AuAPIs in one sentence."
      }
    ],
    "stream": false
  }'
```

***

### 🌊 6. Streaming Response

To enable streaming output, set `stream=True`.

Python

```
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://www.auapis.com/v1")

stream = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Write a short introduction to API aggregation platforms."}],
    stream=True
)

for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
```

***

### 💰 7. Billing

AuAPIs uses a pay-as-you-go billing model based on actual usage (Input, Output, Cached tokens, etc.).

Monitor your usage in:

* Task Logs
* Request Records
* Billing Records

> \[!WARNING]
>
> Before using high-cost models or image models in production, please check the model pricing page carefully.

***

### 🛡️ 8. Content Policy

Requests may pass through automated safety filters. Rejections may occur due to:

* Illegal or harmful content
* Abuse, spam, or automated attacks
* Attempts to bypass model safety rules
* High-risk prompts/outputs or policy violations

***

### ❓ 9. Error Codes

| **Code** | **Error Type**    | **Description**                | **Suggested Solution**                    |
| -------- | ----------------- | ------------------------------ | ----------------------------------------- |
| `400`    | Bad Request       | Format error or policy trigger | Check request body and prompt content.    |
| `401`    | Unauthorized      | Invalid/Missing API Key        | Check if Key is active and in the Header. |
| `402`    | Payment Required  | Insufficient balance           | Recharge your account.                    |
| `404`    | Not Found         | Model/Endpoint not found       | Check endpoint path and model name.       |
| `429`    | Too Many Requests | Rate limit exceeded            | Reduce frequency or upgrade limit.        |
| `500`    | Internal Error    | Platform/Upstream error        | Retry later or contact support.           |

***

### 💡 10. Best Practices

* ✅ Base URL: Always use `[https://www.auapis.com/v1](https://www.auapis.com/v1)`.
* ✅ Security: Keep your API Key private; never expose it in frontend code.
* ✅ Efficiency: Use streaming for long-form responses to improve user experience.
* ✅ Resilience: Add retry logic to handle temporary upstream errors.
* ✅ Compliance: Avoid sending illegal, abusive, or policy-violating content.

***

### ✉️ 11. Support

If you encounter issues with API access, billing, or model availability, please contact AuAPIs support through the platform console.

#### 📥 More Models

> The list above includes only our most popular model aliases. AuAPIs currently supports 30+ mainstream AI model routes.
>
> To view the complete list of supported models and real-time rates:
>
> * Please visit the [Model Pricing](https://www.auapis.com/) page in your dashboard for all available Model IDs and their specific billing units.


---

# 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.auapis.com/auapis-developer-documentation.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.
