Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- ai-api
|
| 5 |
+
- gpt-5.2
|
| 6 |
+
- sora-2
|
| 7 |
+
- veo-3.1
|
| 8 |
+
- gpt-image-1.5
|
| 9 |
+
- nexaapi
|
| 10 |
+
- tutorial
|
| 11 |
+
- python
|
| 12 |
+
- javascript
|
| 13 |
+
- multimodal
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# GPT-5.2, Sora 2, Veo 3.1 & GPT Image 1.5 API Tutorial via NexaAPI
|
| 17 |
+
|
| 18 |
+
Access all four top 2026 AI models through one unified API.
|
| 19 |
+
|
| 20 |
+
## Quick Start
|
| 21 |
+
|
| 22 |
+
```bash
|
| 23 |
+
pip install nexaapi
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
from nexaapi import NexaAPI
|
| 28 |
+
|
| 29 |
+
client = NexaAPI(api_key='YOUR_API_KEY')
|
| 30 |
+
|
| 31 |
+
# GPT-5.2
|
| 32 |
+
response = client.chat.completions.create(
|
| 33 |
+
model='gpt-5.2',
|
| 34 |
+
messages=[{'role': 'user', 'content': 'Hello!'}]
|
| 35 |
+
)
|
| 36 |
+
|
| 37 |
+
# GPT Image 1.5
|
| 38 |
+
image = client.images.generate(model='gpt-image-1.5', prompt='A sunset', size='1024x1024')
|
| 39 |
+
|
| 40 |
+
# Sora 2
|
| 41 |
+
video = client.videos.generate(model='sora-2', prompt='A blooming flower', duration=5)
|
| 42 |
+
|
| 43 |
+
# Veo 3.1
|
| 44 |
+
cinematic = client.videos.generate(model='veo-3.1', prompt='Mountain aerial shot', duration=8, resolution='1080p')
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Pricing Comparison
|
| 48 |
+
|
| 49 |
+
| Model | Direct Price | NexaAPI Price | Savings |
|
| 50 |
+
|-------|-------------|---------------|---------|
|
| 51 |
+
| GPT-5.2 | $0.015/1K tokens | $0.003/1K tokens | **80% cheaper** |
|
| 52 |
+
| GPT Image 1.5 | $0.020/image | $0.003/image | **85% cheaper** |
|
| 53 |
+
| Sora 2 | $0.20/video | $0.05/video | **75% cheaper** |
|
| 54 |
+
| Veo 3.1 | $0.35/video | $0.08/video | **77% cheaper** |
|
| 55 |
+
|
| 56 |
+
## Links
|
| 57 |
+
|
| 58 |
+
- 🌐 [NexaAPI Website](https://nexa-api.com)
|
| 59 |
+
- 🚀 [Try on RapidAPI](https://rapidapi.com/user/nexaquency)
|
| 60 |
+
- 📦 [pip install nexaapi](https://pypi.org/project/nexaapi/)
|
| 61 |
+
- 📦 [npm install nexaapi](https://www.npmjs.com/package/nexaapi)
|
| 62 |
+
- 💻 [GitHub Tutorial Repo](https://github.com/diwushennian4955/nexaapi-2026-top-models-tutorial)
|
| 63 |
+
- 📓 [Google Colab Notebook](https://colab.research.google.com/github/diwushennian4955/nexaapi-2026-top-models-tutorial/blob/main/NexaAPI_2026_Top_Models_Tutorial.ipynb)
|
| 64 |
+
- 📝 [Dev.to Article](https://dev.to/diwushennian4955/i-tested-gpt-52-sora-2-veo-31-gpt-image-15-apis-heres-how-to-use-them-all-in-one-sdk-4g3b)
|