diff --git a/docs/my-website/docs/providers/bedrock.md b/docs/my-website/docs/providers/bedrock.md index 628132b448..1416006bf1 100644 --- a/docs/my-website/docs/providers/bedrock.md +++ b/docs/my-website/docs/providers/bedrock.md @@ -1792,10 +1792,14 @@ print(response) ### Advanced - [Pass model/provider-specific Params](https://docs.litellm.ai/docs/completion/provider_specific_params#proxy-usage) ## Image Generation -Use this for stable diffusion on bedrock +Use this for stable diffusion, and amazon nova canvas on bedrock ### Usage + + + + ```python import os from litellm import image_generation @@ -1830,6 +1834,41 @@ response = image_generation( ) print(f"response: {response}") ``` + + + +1. Setup config.yaml + +```yaml +model_list: + - model_name: amazon.nova-canvas-v1:0 + litellm_params: + model: bedrock/amazon.nova-canvas-v1:0 + aws_region_name: "us-east-1" + aws_secret_access_key: my-key # OPTIONAL - all boto3 auth params supported + aws_secret_access_id: my-id # OPTIONAL - all boto3 auth params supported +``` + +2. Start proxy + +```bash +litellm --config /path/to/config.yaml +``` + +3. Test it! + +```bash +curl -L -X POST 'http://0.0.0.0:4000/v1/images/generations' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer $LITELLM_VIRTUAL_KEY' \ +-d '{ + "model": "amazon.nova-canvas-v1:0", + "prompt": "A cute baby sea otter" +}' +``` + + + ## Supported AWS Bedrock Image Generation Models diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml index a8de76184f..1aed68b09f 100644 --- a/litellm/proxy/_new_secret_config.yaml +++ b/litellm/proxy/_new_secret_config.yaml @@ -1,9 +1,5 @@ model_list: - - model_name: whisper + - model_name: amazon.nova-canvas-v1:0 litellm_params: - model: azure/azure-whisper - api_version: 2024-02-15-preview - api_base: os.environ/AZURE_EUROPE_API_BASE - api_key: os.environ/AZURE_EUROPE_API_KEY - model_info: - mode: audio_transcription + model: bedrock/amazon.nova-canvas-v1:0 + aws_region_name: "us-east-1" \ No newline at end of file