View a markdown version of this page

Titan Image Generator G1 v2 - Amazon Bedrock

Titan Image Generator G1 v2

Amazon logo with curved arrow from A to Z forming a smile. Amazon — Titan Image Generator G1 v2

Model Details

Titan Image Generator G1 v2 is Amazon's image generation model that creates and edits realistic images from text prompts with built-in watermarking. For more information about model development and performance, see the model/service card.

  • Model launch date: Nov 29, 2023

  • Model EOL date: June 30, 2026

  • End User License Agreements and Terms of Use: View

  • Model lifecycle: Legacy

Input Modalities Output Modalities APIs supported Endpoints supported
Red circle with white X icon indicating error, cancel, or close action. AudioRed circle with white X icon indicating error, cancel, or close action. EmbeddingRed circle with white X icon indicating error, cancel, or close action. ResponsesGreen circle with white checkmark icon. bedrock-runtime
Green circle with white checkmark icon. ImageGreen circle with white checkmark icon. ImageRed circle with white X icon indicating error, cancel, or close action. Chat CompletionsRed circle with white X icon indicating error, cancel, or close action. bedrock-mantle
Red circle with white X icon indicating error, cancel, or close action. SpeechRed circle with white X icon indicating error, cancel, or close action. SpeechGreen circle with white checkmark icon. Invoke
Green circle with white checkmark icon. TextRed circle with white X icon indicating error, cancel, or close action. TextRed circle with white X icon indicating error, cancel, or close action. Converse
Red circle with white X icon indicating error, cancel, or close action. VideoRed circle with white X icon indicating error, cancel, or close action. Video

Pricing

For pricing, please refer to the Amazon Bedrock Pricing page.

Programmatic Access

Use the following model IDs and endpoint URLs to access this model programmatically. For more information about the available APIs and endpoints, see APIs supported and Endpoints supported.

Endpoint Model ID In-Region endpoint URL Geo inference ID Global inference ID
bedrock-runtime amazon.titan-image-generator-v2:0 https://bedrock-runtime.{region}.amazonaws.com Not supported Not supported

For example, if region is us-east-1 (N. Virginia), then the bedrock-runtime endpoint URL will be "https://bedrock-runtime.us-east-1.amazonaws.com" and for bedrock-mantle will be "https://bedrock-mantle.us-east-1.api.aws/v1".

Service Tiers

Amazon Bedrock offers multiple service tiers to match your workload requirements. Standard provides pay-per-token access with no commitment. Priority offers higher throughput with a time-based commitment. Flex provides lower-cost access for flexible, non-time-sensitive workloads. Reserved provides dedicated throughput with a term commitment for predictable workloads. For more information, see service tiers.

Standard Priority Flex Reserved
Green circle with white checkmark icon. Red circle with white X icon indicating error, cancel, or close action. Red circle with white X icon indicating error, cancel, or close action. Red circle with white X icon indicating error, cancel, or close action.

Regional Availability

Regional availability at a glance

Bedrock offers three inference options: In-Region keeps requests within a single Region for strict compliance, Geo Cross-Region routes across Regions within a geography (US, EU, etc.) for higher throughput while respecting data residency, and Global Cross-Region routes anywhere worldwide for maximum throughput when there are no residency constraints. Refer to the Regional availability page for more details.

Region In-Region Geo Global
us-east-1 (N. Virginia)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.
us-west-2 (Oregon)Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.

Quotas and Limits

Your AWS account has default quotas to maintain the performance of the service and to ensure appropriate usage of Amazon Bedrock. The default quotas assigned to an account might be updated depending on regional factors, payment history, fraudulent usage, and/or approval of a quota increase request. For more details, please refer to Quotas for Amazon Bedrock documentation and see the limits for the model.

Sample Code

Step 1 - AWS Account: If you have an AWS account already, skip this step. If you are new to AWS, sign up for an AWS account.

Step 2 - API key: Go to the Amazon Bedrock console and generate a long-term API key.

Step 3 - Get the SDK: To use this getting started guide, you must have Python already installed. Then install the relevant software depending on the APIs you are using.

pip install boto3

Step 4 - Set environment variables: Configure your environment to use the API key for authentication.

AWS_BEARER_TOKEN_BEDROCK="<provide your Bedrock API key>"

Step 5 - Run your first inference request: Save the file as bedrock-first-request.py

Invoke API
import json import base64 import boto3 client = boto3.client('bedrock-runtime', region_name='us-east-1') response = client.invoke_model( modelId='amazon.titan-image-generator-v2:0', body=json.dumps({ 'taskType': 'TEXT_IMAGE', 'textToImageParams': { 'text': 'A photograph of a cup of coffee' }, 'imageGenerationConfig': { 'numberOfImages': 1, 'height': 1024, 'width': 1024 } }) ) response_body = json.loads(response['body'].read()) base64_image = response_body['images'][0] print(f'Image generated: {len(base64_image)} bytes (base64)')