# AIPower Examples

Copy-paste examples for AIPower's OpenAI-compatible API.

AIPower gives developers GPT, Claude, Gemini, DeepSeek, Qwen, GLM, Kimi, Doubao, and more through one endpoint:

```text
https://api.aipower.me/v1
```

## Start Here

- Website examples: https://aipower.me/examples?utm_source=site_static&utm_medium=examples&utm_campaign=developer_examples
- API docs: https://aipower.me/docs?utm_source=site_static&utm_medium=examples&utm_campaign=developer_examples
- Try demo: https://aipower.me/try?utm_source=site_static&utm_medium=examples&utm_campaign=developer_examples
- Get API key: https://aipower.me/register?utm_source=site_static&utm_medium=examples&utm_campaign=developer_examples

## Files

| Example | URL | Use case |
|---|---|---|
| Python quickstart | https://aipower.me/examples/python/quickstart.py | First API call with the OpenAI Python SDK |
| Node.js quickstart | https://aipower.me/examples/node/quickstart.mjs | First API call with the OpenAI Node SDK |
| curl quickstart | https://aipower.me/examples/curl/quickstart.sh | No SDK, direct HTTP request |
| n8n HTTP body | https://aipower.me/examples/n8n/http-request-body.json | HTTP Request node body for n8n workflows |
| Dify setup | https://aipower.me/examples/dify/README.md | OpenAI-compatible model provider settings |
| Open WebUI setup | https://aipower.me/examples/open-webui/README.md | Self-hosted chat provider settings |

## Recommended Starter Models

| Job | Model |
|---|---|
| General chat | `deepseek/deepseek-chat` |
| Chinese chat | `qwen/qwen-plus` |
| Low-cost classification | `zhipu/glm-4-flash` |
| Code and analysis | `anthropic/claude-sonnet` |
| Long context | `google/gemini-2.5-flash` |

## Notes

- Keep your API key in an environment variable.
- Use `https://api.aipower.me/v1` as the base URL.
- Start with trial-friendly models, then top up to unlock premium routes.
