Model API Pages
Google Imagen4 Fast API Integration
Google Imagen4 Fast کو Rivya Public API v1 کے ذریعے model id google-imagen4-fast، supported inputs، parameters، Files API rules، credits اور response examples کے ساتھ استعمال کریں۔
API کے ذریعے availableText input readyImage
API model id
google-imagen4-fast
Inputs
text
Files API
Minimal request کے لیے required نہیں
Base credits
4
Capability
Image
Billing
FIXED
Prompt limit
5000 characters
Request contract
model id کو top level پر بھیجیں۔ Model-specific controls params میں رہتے ہیں۔
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | google-imagen4-fast | google-imagen4-fast API model id استعمال کریں۔ |
| prompt | string | Yes | - | اس model کے لیے زیادہ سے زیادہ 5000 characters۔ |
| params | object | No | - | Model-specific parameter object۔ allowed keys کے لیے نیچے والی rows استعمال کریں۔ |
| client_request_id | string | No | - | آپ کے system میں requests trace کرنے کے لیے optional client-side id۔ |
Model parameters
| Key | Type | Required | Default | Range | Options | Description |
|---|---|---|---|---|---|---|
| aspect_ratio | select | No | 16:9 | - | 1:1, 16:9, 9:16, 3:4, 4:3 | پہلو کا تناسب |
| negative_prompt | text | No | - | - | - | منفی پرامپٹ |
| seed | number | No | - | min 0 | - | ہر بار نیا random result چاہیے ہو تو اسے empty چھوڑیں۔ اسی integer کو دوبارہ use کرنے سے previous result reproduce یا fine-tune کرنا آسان ہوتا ہے۔ Result صرف اسی وقت زیادہ قریب رہتا ہے جب prompt اور دوسرے key settings بھی similar رہیں، اور یہ guaranteed 1:1 match نہیں ہوتا۔ |
Minimal request
{
"model": "google-imagen4-fast",
"prompt": "A clean editorial product image on a soft studio background",
"params": {
"aspect_ratio": "16:9",
"negative_prompt": "اختیاری چیزیں جن سے بچنا ہے",
"seed": 0
}
}Create response
create endpoint ایک public task id واپس کرتا ہے۔ task succeeded یا failed ہونے تک status endpoint poll کریں۔
{
"id": "task_google_imagen4_fast_example",
"status": "queued",
"model": "google-imagen4-fast",
"reserved_credits": 4,
"final_credits": 0,
"created_at": "2026-05-11T00:00:00.000Z",
"updated_at": "2026-05-11T00:00:00.000Z",
"result": null,
"error": null
}Common errors
validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found
create endpoint ایک public task id واپس کرتا ہے۔ task succeeded یا failed ہونے تک status endpoint poll کریں۔