Foundation model available in Mumbai. Direct inference without cross-region routing.
Provider: All OpenAI models | AWS Bedrock
Inference regions: ap-south-1
https://bedrock-runtime.ap-south-1.amazonaws.comInstall: pip install boto3
import boto3
client = boto3.client("bedrock-runtime", region_name="ap-south-1")
response = client.converse(
modelId="openai.gpt-oss-safeguard-20b",
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
| Parameter | Type | Description |
|---|---|---|
| max_tokens | integer | Maximum number of tokens to generate in the response. (≥1) |
| temperature | float | Controls randomness. Lower values make output more deterministic. (0–1) Default: 1. |
| top_p | float | Nucleus sampling threshold. Considers tokens with cumulative probability up to this value. (0–1) Default: 1. |
| stop_sequences | string | Up to 4 sequences where the model will stop generating. |
| top_k | integer | Only sample from the top K most likely tokens at each step. (0–500) Default: 250. |
Default mode. Pay per token with no upfront commitment.