nickyni's picture
Upload README.md with huggingface_hub
250cd37 verified
metadata
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

pip install nexaapi
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