Generate Endpoint - VicSee API Video & Image Generation
Create AI videos and images with VicSee's unified generate endpoint. Simple POST request supports all models including Sora 2, Veo 3.1, FLUX 2, and Nano Banana with async processing.
Create AI-generated content using a unified endpoint.
POST /api/v1/generateRequest
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token with your API key |
| Content-Type | Yes | Must be application/json |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | The model to use |
| prompt | string | Yes | Text description of what to generate |
| options | object | No | Model-specific options |
Options
| Option | Type | Description |
|---|---|---|
| aspectRatio | string | Output aspect ratio |
| resolution | string | For nano-banana-pro: 1K, 2K, or 4K |
| duration | number | For video models: 10 or 15 seconds |
| image | string | Base64 or URL for image-to-video |
Example Request
curl -X POST https://vicsee.com/api/v1/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A timelapse of a flower blooming",
"options": {
"duration": 10,
"aspectRatio": "16:9"
}
}'Response
{
"success": true,
"data": {
"id": "task_abc123",
"model": "sora-2",
"status": "processing",
"creditsUsed": 20,
"creditsRemaining": 480,
"createdAt": "2024-12-27T10:30:00.000Z"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique task ID for polling status |
| model | string | The model used |
| status | string | pending, processing, success, or failed |
| creditsUsed | number | Credits consumed |
| creditsRemaining | number | Your remaining balance |
Next Steps
- Save the id from the response
- Poll GET /api/v1/tasks/id for status updates
- When status is success, download your content
Errors
| Code | Description |
|---|---|
| MISSING_MODEL | No model specified |
| MISSING_PROMPT | No prompt provided |
| INVALID_MODEL | Model does not exist |
| INSUFFICIENT_CREDITS | Not enough credits |
| RATE_LIMITED | Too many requests |