View a markdown version of this page

Grok 4.6 - Amazon Bedrock

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Grok 4.6

Icona che mostra il logo XAi. XAi — Grok 4.6

Dettagli del modello

Grok 4.6 è il modello di frontiera di XAi creato per la codifica, le attività agentiche e il knowledge work. Si basa sulle generazioni precedenti di Grok, con particolare attenzione agli agenti di lunga durata e a un lavoro interattivo più ambizioso. Offre una finestra contestuale di 500K e sforzi di ragionamento configurabili (basso, medio, alto, xalto).

Modalità di input Modalità di output API supportate Endpoint supportati
Red circle with white X icon indicating error, cancel, or close action.AudioRed circle with white X icon indicating error, cancel, or close action.IncorporamentoGreen circle with white checkmark icon. ResponsesGreen circle with white checkmark icon. bedrock-runtime
Green circle with white checkmark icon.ImmagineRed circle with white X icon indicating error, cancel, or close action.ImmagineGreen circle with white checkmark icon. Chat CompletionsGreen circle with white checkmark icon. bedrock-mantle
Red circle with white X icon indicating error, cancel, or close action.DiscorsoRed circle with white X icon indicating error, cancel, or close action.DiscorsoGreen circle with white checkmark icon. Converse
Green circle with white checkmark icon.TestoGreen circle with white checkmark icon.TestoGreen circle with white checkmark icon. Invoke
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

Funzionalità e caratteristiche

Caratteristiche di Bedrock

Funzionalità supportate tramite endpoint bedrock-runtime

Funzionalità supportate tramite endpoint bedrock-mantle

Supportato Non supportato

Prezzi

Opzione di inferenza Input Output Lettura della cache
In-Region2,20$6,60$0,55$
Geo CRIS2,20$6,60$0,55$
CRIS globale2,00$6,00$0,50$

Tutti i prezzi si intendono per 1 milione di token. I prezzi indicati si riferiscono al livello Standard.

Supporto di livello Priority e Flex: oltre a Standard, Grok 4.6 supporta i livelli di servizio Priority e Flex. Priority viene fatturato a 1,75 volte la tariffa Standard per token (un premio del 75%) e Flex a 0,5 volte la tariffa Standard (uno sconto del 50%); applica questi moltiplicatori alle tariffe Standard mostrate sopra. Per informazioni dettagliate su ciascun livello di servizio, consulta Livelli di servizio. service-tiers-inference.html

Accesso programmatico

Utilizzate i seguenti ID del modello e URL degli endpoint per accedere a questo modello a livello di codice. Per ulteriori informazioni sulle API e sugli endpoint disponibili, consulta API supportate ed Endpoint supportati. endpoints.html

Endpoint ID del modello In-Region URL dell'endpoint ID di geo-inferenza ID di inferenza globale
bedrock-mantle xai.grok-4.6 https://bedrock-mantle.{region}.api.aws/openai/v1 Non supportata Non supportata
bedrock-runtime xai.grok-4.6 Non supportata us.xai.grok-4.6 global.xai.grok-4.6

Ad esempio, se la regione è us-west-2 (Oregon), l'URL dell'endpoint bedrock-mantle sarà "». https://bedrock-mantle.us-west-2.api.aws/openai/v1 Sìbedrock-runtime, l'URL di base è "https://bedrock-runtime.{region} .amazonaws. com/openai/v1 "e le richieste devono indicare l'ID geografico di inferenza interregionale o fungere da modello. us.xai.grok-4.6 global.xai.grok-4.6

Livelli di servizio

Amazon Bedrock offre diversi livelli di servizio per soddisfare i requisiti del carico di lavoro. Standard fornisce l'accesso pay-per-token senza impegno (imposta o ometti il campo). "service_tier": "default" Priority offre un'elaborazione più rapida e prioritaria a un prezzo superiore (impostato). "service_tier": "priority" Flex offre un accesso a basso costo per carichi di lavoro flessibili e non sensibili al fattore tempo (set). "service_tier": "flex" Per ulteriori informazioni, consulta i livelli di servizio. service-tiers-inference.html

Standard Priorità Flex Riservato
Green circle with white checkmark icon. Green circle with white checkmark icon. Green circle with white checkmark icon. Red circle with white X icon indicating error, cancel, or close action.

Disponibilità regionale

La disponibilità regionale a colpo d'occhio

Amazon Bedrock offre tre opzioni di inferenza: In-Region mantiene le richieste all'interno di una singola regione per garantire una conformità rigorosa, le Cross-Region rotte geografiche tra le regioni all'interno di un'area geografica (come Stati Uniti, UE e APAC) rispettando la residenza dei dati e le Cross-Region rotte globali ovunque nel mondo senza vincoli di residenza. Per maggiori dettagli, consulta la pagina. Disponibilità regionale per modelli

La disponibilità varia a seconda dell'endpoint.

Disponibilità tramite l'endpoint bedrock-mantle

Region In-Region Geo Globale
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.
us-gov-east-1(GovCloud Est)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.

Disponibilità tramite l'bedrock-runtimeendpoint

Region In-Region Geo Globale
us-east-1(Virginia del Nord)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-east-2(Ohio)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-west-1(California del Nord)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-west-2(Oregon)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Green circle with white checkmark icon.
us-gov-west-1(GovCloud Ovest)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.
us-gov-east-1(GovCloud Est)Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.Red circle with white X icon indicating error, cancel, or close action.
ca-central-1(Canada)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ca-west-1(Calgary)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-central-1(Francoforte)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-central-2(Zurigo)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-north-1(Stoccolma)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-south-1(Milano)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-south-2(Spagna)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-west-1(Irlanda)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-west-2(Londra)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
eu-west-3(Parigi)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-east-2(Taipei)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-northeast-1(Tokyo)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-northeast-2(Seul)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-northeast-3(Osaka)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-south-1(Mumbai)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-south-2(Hyderabad)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-1(Singapore)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-2(Sydney)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-3(Giacarta)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-4(Melbourne)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-5(Malesia)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-6(Nuova Zelanda)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
ap-southeast-7(Thailandia)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
il-central-1(Tel Aviv)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
me-central-1(Emirati Arabi Uniti)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
me-south-1(Bahrein)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
af-south-1(Città del Capo)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.
sa-east-1(San Paolo)Red circle with white X icon indicating error, cancel, or close action.Red circle with white X icon indicating error, cancel, or close action.Green circle with white checkmark icon.

Quote e limiti

Il tuo AWS account ha delle quote predefinite per mantenere le prestazioni del servizio e garantire un uso appropriato di Amazon Bedrock. Le quote predefinite assegnate a un account potrebbero essere aggiornate in base a fattori regionali, alla cronologia dei pagamenti, all'uso fraudolento, all' and/or approvazione di una richiesta di aumento delle quote. quotas-increase.html Per ulteriori informazioni, consulta Quote per Amazon Bedrock la documentazione e consulta i limiti del modello.

Codice di esempio

Passaggio 1 - AWS Account: se hai già un AWS account, salta questo passaggio. Se non conosci AWS, crea un account https://portal.aws.amazon.com/billing/signup AWS.

Passaggio 2 - Chiave API: accedi alla console Amazon Bedrock e genera una chiave API a lungo termine.

Nota

Grok 4.6 è un modello XAI. Amazon Bedrock fornisce le sue API Responses e Chat Completions tramite OpenAI-compatible endpoint, quindi questi esempi utilizzano l'SDK OpenAI Python come client. Configura l'SDK con la tua chiave API Amazon Bedrock e un URL di base di Amazon Bedrock come mostrato di seguito; le richieste richiamano il modello xAI su Amazon Bedrock e non vengono inviate a OpenAI.

Passaggio 3 - Scarica l'SDK: per utilizzare questa guida introduttiva, devi avere Python già installato. Quindi installa il software pertinente in base alle API che stai utilizzando.

Responses API / Chat Completions API
pip install openai
Converse API
pip install boto3

Passaggio 4 - Impostazione delle variabili di ambiente: configura il tuo ambiente per utilizzare la chiave API per l'autenticazione.

bedrock-mantle
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-mantle.us-west-2.api.aws/openai/v1"
bedrock-runtime
OPENAI_API_KEY="<provide your Bedrock API key>" OPENAI_BASE_URL="https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1"
Nota

Sìbedrock-runtime, assegna un profilo di inferenza interregionale come modello, oppure. us.xai.grok-4.6 global.xai.grok-4.6 Questo modello non è disponibile per l'inferenza regionale su quell'endpoint. La tua identità IAM deve essere bedrock:InvokeModel inserita anche nel progetto predefinito del tuo account (arn:aws:bedrock:{region}:{account-id}:project/default) oltre al profilo di inferenza.

Fase 5 - Esegui la tua prima richiesta di inferenza: salva il file con nome bedrock-first-request.py

Responses API (bedrock-mantle)
from openai import OpenAI client = OpenAI() response = client.responses.create( model="xai.grok-4.6", input="Can you explain the features of Amazon Bedrock?" ) print(response)
Responses API (bedrock-runtime)
from openai import OpenAI client = OpenAI() response = client.responses.create( model="us.xai.grok-4.6", input="Can you explain the features of Amazon Bedrock?" ) print(response)
Chat Completions API (bedrock-mantle)
from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="xai.grok-4.6", messages=[ {"role": "user", "content": "Can you explain the features of Amazon Bedrock?"} ] ) print(response)
Chat Completions API (bedrock-runtime)
from openai import OpenAI client = OpenAI() response = client.chat.completions.create( model="us.xai.grok-4.6", messages=[ {"role": "user", "content": "Can you explain the features of Amazon Bedrock?"} ] ) print(response)
Converse API (bedrock-runtime)
import boto3 client = boto3.client("bedrock-runtime", region_name="us-east-1") response = client.converse( modelId="us.xai.grok-4.6", messages=[ {"role": "user", "content": [{"text": "Can you explain the features of Amazon Bedrock?"}]} ] ) print(response["output"]["message"]["content"][0]["text"])

Considerazioni e limitazioni sull'utilizzo

  • Sforzo di ragionamento: il ragionamento è sempre attivo per impostazione predefinita. È possibile configurare lo sforzo tramite il reasoning parametro: "low" (predefinito), "medium""high", o. "xhigh" Il contenuto di Reasoning è crittografato e può essere restituito inviando include: ["reasoning.encrypted_content"] la richiesta API Responses. Puoi inviare il contenuto crittografato nei turni successivi per fornire un contesto di ragionamento per conversazioni a più turni. L'API Chat Completions non restituisce token di ragionamento.

    response = client.responses.create( model="us.xai.grok-4.6", reasoning={"effort": "high"}, include=["reasoning.encrypted_content"], input="Explain quantum entanglement simply." ) print(response.output_text)