v1.0.0Stable

Hypereal API

Generate stunning videos and images using state-of-the-art AI models. Asynchronous processing with webhook-based delivery.

Quick Start

The Hypereal API provides access to powerful media generation models. All requests require Bearer authentication with your API key.

LLM Chat

New

Uncensored AI chat with 32k context

Video Generation

Sora, Kling, WAN, Seedance & more

Image Generation

FLUX.1 Schnell & Dev models

Image Editing

Nano Banana, FLUX Kontext, Qwen Edit

Audio Generation

Voice cloning & text-to-speech

3D Model Generation

Image to 3D GLB models

Authentication
Authorization: Bearer YOUR_API_KEY
POST/api/v1/spicy-chat
New32k context

LLM Chat

Powerful LLM chat API with streaming support. Ideal for building chatbots, content generation, code assistance, and any conversational AI application.

Request Body

messages
Required
Array of message objects with role and content
temperature
Optional
Sampling temperature 0.0-2.0 (default: 0.8)
max_tokens
Optional
Maximum tokens to generate (default: 4096)
stream
Optional
Enable SSE streaming (default: true)

Pricing

Input:$0.20 / 1M tokens
Output:$0.90 / 1M tokens

Base: 2 credits per message (scales with conversation length)

cURL Request
curl -X POST https://api.hypereal.cloud/v1/spicy-chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "messages": [
      {"role": "user", "content": "Hello, how are you?"}
    ],
    "stream": false
  }'
Response (200 OK)
{
  "id": "chatcmpl-abc123",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Hello! I'm doing great..."
    },
    "finish_reason": "stop"
  }],
  "creditsUsed": 2
}
JavaScript (Streaming)
const response = await fetch('https://api.hypereal.cloud/v1/spicy-chat', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    messages: [{ role: 'user', content: 'Hi!' }],
    stream: true
  })
});

const reader = response.body.getReader();
while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  // Process SSE chunks
}
POST/api/v1/images/generate

Generate Images

Generate images using state-of-the-art AI models. This endpoint processes requests synchronously and returns the generated image URL directly in the response.

Request Body

prompt
Required
Text description of the image to generate
model
Optional
Model slug (defaults to nano-banana-t2i)
size
Optional
Output resolution (e.g., "1024*1024")
image
Optional
Source image URL (for image editing models)

Response Fields

created
Unix timestamp of when the image was created
data
Array containing the generated image(s) with url and model
creditsUsed
Number of credits consumed for this generation
resultId
Unique identifier for the generated result
cURL Request
curl -X POST https://api.hypereal.cloud/v1/images/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "prompt": "A futuristic cityscape at sunset with flying cars",
    "model": "flux-1-schnell",
    "size": "1024*1024"
  }'
Response (200 OK)
{
  "created": 1766841456,
  "data": [
    {
      "url": "https://cdn.hypereal.cloud/output/image.png",
      "model": "flux-1-schnell"
    }
  ],
  "resultId": "res_abc123456",
  "creditsUsed": 5
}
POST/api/v1/videos/generate

Generate Videos

Generate videos using state-of-the-art AI models. This endpoint supports both text-to-video and image-to-video generation with webhook callbacks for async delivery.

Request Body

model
Required
Model slug (e.g., sora-2-i2v)
input.prompt
Optional
Text description for video generation
input.image
Optional
Source image URL for image-to-video models
input.duration
Optional
Video duration in seconds (model-dependent)
webhook_url
Optional
URL to receive the result when generation completes

Response Fields

jobId
Unique job identifier for polling status
outputUrl
Generated video URL (available when complete)
creditsUsed
Number of credits consumed for this generation
cURL Request
curl -X POST https://api.hypereal.cloud/v1/videos/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "sora-2-i2v",
    "input": {
      "prompt": "Camera slowly pans across the scene",
      "image": "https://hypereal.cloud/demo-girl.webp",
      "duration": 5
    },
    "webhook_url": "https://your-server.com/webhook"
  }'
Response (202 Accepted)
{
  "jobId": "job_abc123456",
  "status": "processing",
  "message": "Generation started. Result will be sent to your webhook URL.",
  "creditsUsed": 69
}

Processing Modes

Synchronous (Images)

The /api/v1/images/generate endpoint processes requests synchronously. The generated image URL is returned directly in the response.

Asynchronous (Videos)

The /api/v1/videos/generate endpoint processes requests asynchronously. Provide a webhook_url to receive results when complete, or poll the job status endpoint.

Webhook Delivery

Provide a webhook_url in your request to receive the result when generation completes. We'll POST the result directly to your server.

Webhook Payload

{
  "status": "completed",
  "outputUrl": "https://cdn.hypereal.cloud/output/video.mp4",
  "jobId": "job_abc123456",
  "type": "video",
  "model": "sora-2-i2v",
  "creditsUsed": 69
}

Example: Node.js Webhook Handler

app.post('/webhook/hypereal', express.json(), (req, res) => {
  const { status, outputUrl, jobId, error } = req.body;

  if (status === 'completed') {
    console.log(`Job ${jobId} completed: ${outputUrl}`);
    // Save to database, notify user, etc.
  } else if (status === 'failed') {
    console.error(`Job ${jobId} failed: ${error}`);
  }

  // Always return 200 to acknowledge receipt
  res.status(200).json({ received: true });
});

Return 200 immediately

Process asynchronously if needed, but respond quickly to avoid timeouts.

Handle idempotency

Use jobId to prevent duplicate processing.

GET/api/v1/jobs/{id}

Job Polling

If you can't receive webhooks, use the pollUrl returned in the initial response to check job status until complete.

Query Parameters

model
Model slug used for generation
type
video or image
Poll Request
GET /api/v1/jobs/job_abc123?model=sora-2-i2v&type=video
Response (Completed)
{
  "status": "completed",
  "outputUrl": "https://cdn.hypereal.cloud/output/video.mp4",
  "jobId": "job_abc123"
}

Supported Models

All available models with their parameters and pricing.

Video Generation (14 models)

Image Generation (6 models)

Image Editing (5 models)

Audio Generation (3 models)

3D Model Generation (1 models)

Error Responses

All endpoints return standard HTTP status codes with error details in JSON format.

401

Unauthorized

{
  "error": "Unauthorized. Please log in..."
}
400

Bad Request

{
  "error": "Model is required"
}
402

Insufficient Credits

{
  "error": "Insufficient credits",
  "required": 69,
  "available": 10
}
404

Not Found

{
  "error": "Job not found"
}

Rate Limits

Rate limits are enforced per API key on a rolling 1-hour window.

Default Limit1000 requests/hour

Each API key has a default rate limit of 1000 requests per hour. Exceeding returns 429.

Credits

Credits are deducted when you submit a request (before processing).

LLM Chat

New

2+ credits per message

Video Generation

13-206 credits per video

Image Generation

4-5 credits per image

Image Editing

2-24 credits per edit

Audio Generation

107 credits per voice clone

3D Model Generation

45 credits per 3D model