All models
Google Imagen 4.0 Preview
Image model from Google, good for image Generation.
Price
- Per image
- 0.08credits per 1MP image
- Images per credit
- 12.50at 1MP
Details
- Provider
- Type
- Image
- Good for
- Image Generation
- Reads
- Text
- Returns
- Image
Prices are in credits, drawn from one prepaid balance. See how credits work
Call it
use BitmeshAI\BitmeshClient; // Optional third argument: timeout in seconds (default 30) $client = new BitmeshClient('YOUR_CONSUMER_KEY', 'YOUR_CONSUMER_SECRET'); $response = $client->image([ 'prompt' => 'Flying car', 'model' => 'google/imagen-4.0-preview', 'width' => 1024, 'height' => 1024, ]); $url = $response['data'][0]['url'] ?? null;
import os from bitmesh_ai import BitmeshClient # Optional third argument: timeout_seconds (default 30) client = BitmeshClient( os.environ["BITMESH_CONSUMER_KEY"], os.environ["BITMESH_CONSUMER_SECRET"], ) response = client.image({ "prompt": "Flying car", "model": "google/imagen-4.0-preview", "width": 1024, "height": 1024, }) url = response["data"][0]["url"]
import Bitmesh
let client = BitmeshClient(key: consumerKey, secret: consumerSecret)
let response = try await client.image(payload: [
"prompt": "Flying car",
"model": "google/imagen-4.0-preview",
"width": 1024,
"height": 1024,
])
import 'package:bitmesh_flutter_sdk/bitmesh_flutter_sdk.dart'; // Create one client and reuse it final client = BitmeshClient.fromKeys(consumerKey, consumerSecret); final result = await client.images.generate(const ImageRequest( prompt: 'Flying car', model: 'google/imagen-4.0-preview', width: 1024, height: 1024, )); final url = result.first?.resolveUrl(client.options.baseUrl);
The SDK signs the request with your key and secret. Installing it is covered in the documentation.