Google Gemini API
    Google Gemini API
    • Get API key
    • Release notes
    • Libraries
    • Run Gemini on Google Cloud
    • Model Capabilities
      • Overview
      • Long context
      • Structured output
      • Document understanding
      • Image understanding
      • Video understanding
      • Audio understanding
      • Text generation
        • Text input
        • Image input
        • Streaming output
        • Multi-turn conversations
        • Multi-turn conversations (Streaming)
        • Configuration parameters
      • Generate images
        • Generate images using Gemini
        • Image editing with Gemini
        • Generate images using Imagen 3
      • Gemini thinking
        • Use thinking models
        • Set budget on thinking models
      • Function calling
        • Function Calling with the Gemini API
    • models
      • All Model
      • Pricing
      • Rate limits
      • Billing info
    • Safety
      • Safety settings
      • Safety guidance

    Libraries

    This page provides information about how to download or install the libraries for accessing the Gemini API. If you're new to the Gemini API, try out the API quickstart.
    Note: Based on developer feedback, we created the new Google Gen AI SDK, if you are using one of the previous SDKs, check out our migration guide.

    Python#

    We provide a Python SDK which you can install by running:
    pip install google-genai

    JavaScript and TypeScript (Preview)#

    We provide a JavaScript and TypeScript SDK which you can install by running:
    npm install @google/genai

    Go (Preview)#

    We provide a Go SDK which you can install by running:
    go get google.golang.org/genai

    Previous SDKs#

    The following is a set of our previous SDK's which are no longer being actively developed, you can switch to the updated Google Gen AI SDK by using our migration guide:
    Previous Python SDK
    Previous Node.js SDK
    Previous Go SDK
    Previous Dart and Flutter SDK
    Previous Swift SDK
    Previous Android SDK
    Previous
    Release notes
    Next
    Run Gemini on Google Cloud
    Built with