Ottieni una chiave API
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Per utilizzare l'API, è necessaria una chiave API.
Puoi creare una chiave con un solo clic in MakerSuite.
Ottenere una chiave API
Verifica la chiave API con il comando curl
Puoi utilizzare un comando curl per verificare la configurazione.
Puoi passare la chiave API nell'URL:
PALM_KEY="YOUR KEY HERE"
curl -H 'Content-Type: application/json' \
-d '{"prompt": {text: "Give me five subcategories of jazz"} }' \
"https://generativelanguage.googleapis.com/v1/models/text-bison-001:generateText?key=${PALM_KEY}"
Oppure nell'intestazione x-goog-api-key
:
PALM_KEY="YOUR KEY HERE"
curl -H 'Content-Type: application/json' \
-H "x-goog-api-key: ${PALM_KEY}" \
-d '{"prompt": {text: "Give me five subcategories of jazz"} }' \
"https://generativelanguage.googleapis.com/v1/models/text-bison-001:generateText"
Passaggi successivi
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-04-11 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Mancano le informazioni di cui ho bisogno"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Troppo complicato/troppi passaggi"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Obsoleti"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Problema di traduzione"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Problema relativo a esempi/codice"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Altra"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Facile da capire"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Il problema è stato risolto"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Altra"
}]
{"lastModified": "Ultimo aggiornamento 2024-04-11 UTC."}
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2024-04-11 UTC."],[],[]]