[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-04-11 UTC."],[],[],null,["# Get an API key\n\n\u003cbr /\u003e\n\nTo use the API, you need an API key.\nYou can create a key with one click in MakerSuite.\n\n[Get an API key](https://makersuite.google.com/app/apikey)\n| **Note:** Remember to use your API keys securely. Check out this [support\n| article](https://support.google.com/googleapi/answer/6310037) to learn best practices.\n\nVerify your API key with curl command\n-------------------------------------\n\nYou can use a curl command to verify your setup.\nYou can pass the API key either in the URL: \n\n PALM_KEY=\"YOUR KEY HERE\"\n curl -H 'Content-Type: application/json' \\\n -d '{\"prompt\": {text: \"Give me five subcategories of jazz\"} }' \\\n \"https://generativelanguage.googleapis.com/v1/models/text-bison-001:generateText?key=${PALM_KEY}\"\n\nOr in the `x-goog-api-key` header: \n\n PALM_KEY=\"YOUR KEY HERE\"\n curl -H 'Content-Type: application/json' \\\n -H \"x-goog-api-key: ${PALM_KEY}\" \\\n -d '{\"prompt\": {text: \"Give me five subcategories of jazz\"} }' \\\n \"https://generativelanguage.googleapis.com/v1/models/text-bison-001:generateText\"\n\nNext steps\n----------\n\n- Follow any of the [API quickstarts](/palm_docs/chat_quickstart) to start using your API key.\n- For more information about using Google API keys refer to [Authenticate using API keys](https://cloud.google.com/docs/authentication/api-keys)"]]