--- license: mit tags: - ai-api - gpt-5.2 - sora-2 - veo-3.1 - gpt-image-1.5 - nexaapi - tutorial - python - javascript - multimodal --- # GPT-5.2, Sora 2, Veo 3.1 & GPT Image 1.5 API Tutorial via NexaAPI Access all four top 2026 AI models through one unified API. ## Quick Start ```bash pip install nexaapi ``` ```python from nexaapi import NexaAPI client = NexaAPI(api_key='YOUR_API_KEY') # GPT-5.2 response = client.chat.completions.create( model='gpt-5.2', messages=[{'role': 'user', 'content': 'Hello!'}] ) # GPT Image 1.5 image = client.images.generate(model='gpt-image-1.5', prompt='A sunset', size='1024x1024') # Sora 2 video = client.videos.generate(model='sora-2', prompt='A blooming flower', duration=5) # Veo 3.1 cinematic = client.videos.generate(model='veo-3.1', prompt='Mountain aerial shot', duration=8, resolution='1080p') ``` ## Pricing Comparison | Model | Direct Price | NexaAPI Price | Savings | |-------|-------------|---------------|---------| | GPT-5.2 | $0.015/1K tokens | $0.003/1K tokens | **80% cheaper** | | GPT Image 1.5 | $0.020/image | $0.003/image | **85% cheaper** | | Sora 2 | $0.20/video | $0.05/video | **75% cheaper** | | Veo 3.1 | $0.35/video | $0.08/video | **77% cheaper** | ## Links - 🌐 [NexaAPI Website](https://nexa-api.com) - 🚀 [Try on RapidAPI](https://rapidapi.com/user/nexaquency) - 📦 [pip install nexaapi](https://pypi.org/project/nexaapi/) - 📦 [npm install nexaapi](https://www.npmjs.com/package/nexaapi) - 💻 [GitHub Tutorial Repo](https://github.com/diwushennian4955/nexaapi-2026-top-models-tutorial) - 📓 [Google Colab Notebook](https://colab.research.google.com/github/diwushennian4955/nexaapi-2026-top-models-tutorial/blob/main/NexaAPI_2026_Top_Models_Tutorial.ipynb) - 📝 [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)