Images
Full-featured image generation with all parameters.
The images.generate method gives you full control over image generation, including dimensions, negative prompts, seeds, caching, and webhooks.
Basic Usage
Full Options (JavaScript)
The JavaScript SDK supports additional options for caching and webhooks:
ImageResult Properties
| Property | Python | JavaScript | Type | Description |
|---|---|---|---|---|
| ID | result.id | result.id | string | Request ID |
| Images | result.images | result.images | list[str] / string[] | Generated image URLs |
| Model | result.model | result.model | string | Model identifier |
| Provider | result.provider | result.provider | string | Provider name |
| Cost | result.cost | result.cost | float / number | Cost in USD |
| Cache hit | result.cache_hit | result.cacheHit | bool / boolean | Served from cache? |
| Latency | result.latency_ms | result.latencyMs | int | None / number | Latency in ms |
| Created at | result.created_at | result.createdAt | datetime / string | Creation timestamp |