Pegasus 1 2

Routes inference requests from Seoul to Twelve Labs models in Hyderabad, Mumbai and 6 more regions

Provider: All Twelve Labs models | AWS Bedrock

Inference regions: ap-south-2, ap-south-1, ap-southeast-1, ap-northeast-3, ap-southeast-2, ap-northeast-2, ap-northeast-1, ap-southeast-4

API Endpoint

https://bedrock-runtime.ap-northeast-2.amazonaws.com

Quick Start (Python)

Install: pip install boto3

import boto3

client = boto3.client("bedrock-runtime", region_name="ap-northeast-2")

response = client.converse(
    modelId="apac.twelvelabs.pegasus-1-2-v1",
    messages=[
        {
            "role": "user",
            "content": [{"text": "Hello, how are you?"}],
        }
    ],
    inferenceConfig={
        "maxTokens": 1024,
        "temperature": 0.7,
    },
)

print(response["output"]["message"]["content"][0]["text"])

Additional examples: Basic invoke, Streaming

Supported Parameters

ParameterTypeDescription
max_tokensintegerMaximum number of tokens to generate in the response. (≥1)
temperaturefloatControls randomness. Lower values make output more deterministic. (0–1) Default: 1.
top_pfloatNucleus sampling threshold. Considers tokens with cumulative probability up to this value. (0–1) Default: 1.
stop_sequencesstringUp to 4 sequences where the model will stop generating.
top_kintegerOnly sample from the top K most likely tokens at each step. (0–500) Default: 250.

Feature Guides

On-Demand Inference

Default mode. Pay per token with no upfront commitment.

Documentation