> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/googleapis/python-genai/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Build powerful AI applications with Google's Gemini models using the official Python SDK

<div className="dark:bg-[#0f1117] bg-white">
  <div className="relative overflow-hidden dark:bg-gradient-to-b dark:from-[#1a1d27] dark:to-[#0f1117] bg-gradient-to-b from-gray-50 to-white py-20">
    <div className="max-w-6xl mx-auto px-6">
      <div className="text-center">
        <h1 className="text-5xl md:text-6xl font-bold dark:text-white text-gray-900 mb-6">
          Google Gen AI Python SDK
        </h1>

        <p className="text-xl dark:text-gray-300 text-gray-600 max-w-3xl mx-auto mb-10">
          Build powerful generative AI applications with Google's Gemini models. Support for both the Gemini Developer API and Vertex AI with a unified Python interface.
        </p>

        <div className="flex flex-wrap gap-4 justify-center">
          <a href="/quickstart" className="inline-flex items-center px-6 py-3 rounded-lg font-semibold text-white transition-colors" style={{ backgroundColor: '#238636' }}>
            Get Started
          </a>

          <a href="/api/client" className="inline-flex items-center px-6 py-3 rounded-lg font-semibold dark:bg-white/10 bg-gray-100 dark:text-white text-gray-900 dark:border-white/20 border border-gray-300 dark:hover:bg-white/20 hover:bg-gray-200 transition-colors">
            API Reference
          </a>
        </div>
      </div>
    </div>
  </div>

  <div className="mt-16 mb-16 max-w-5xl mx-auto px-6">
    <h2 className="text-3xl font-semibold dark:text-white text-gray-900 mb-4">
      Quick start
    </h2>

    <p className="dark:text-gray-400 text-gray-600 mb-8">
      Get up and running with the Google Gen AI SDK in just a few steps.
    </p>

    <Steps>
      <Step title="Install the SDK">
        Install the package using pip or your preferred package manager.

        ```bash theme={null}
        pip install google-genai
        ```
      </Step>

      <Step title="Initialize the client">
        Create a client with your API key or Vertex AI credentials.

        ```python theme={null}
        from google import genai

        # For Gemini Developer API
        client = genai.Client(api_key='YOUR_API_KEY')

        # Or for Vertex AI
        client = genai.Client(
            vertexai=True,
            project='your-project-id',
            location='us-central1'
        )
        ```
      </Step>

      <Step title="Generate your first content">
        Use the generate\_content method to interact with Gemini models.

        ```python theme={null}
        response = client.models.generate_content(
            model='gemini-2.5-flash',
            contents='Why is the sky blue?'
        )
        print(response.text)
        ```

        <Accordion title="Example output">
          ```
          The sky appears blue due to a phenomenon called Rayleigh scattering. 
          Sunlight is made up of all the colors of the rainbow...
          ```
        </Accordion>
      </Step>
    </Steps>
  </div>

  <div className="mt-16 mb-16 max-w-5xl mx-auto px-6">
    <h2 className="text-3xl font-semibold dark:text-white text-gray-900 mb-4">
      Key features
    </h2>

    <p className="dark:text-gray-400 text-gray-600 mb-8">
      Everything you need to build production-ready generative AI applications.
    </p>

    <CardGroup cols={2}>
      <Card title="Multimodal generation" icon="wand-magic-sparkles" href="/guides/generate-content">
        Generate text, images, and videos with state-of-the-art Gemini models
      </Card>

      <Card title="Function calling" icon="code" href="/guides/function-calling">
        Let models interact with your APIs and tools through automatic function orchestration
      </Card>

      <Card title="Streaming support" icon="stream" href="/guides/streaming">
        Stream responses in real-time for interactive user experiences
      </Card>

      <Card title="Multi-turn conversations" icon="comments" href="/guides/chats">
        Build chatbots with context-aware chat sessions
      </Card>

      <Card title="Fine-tuning" icon="sliders" href="/guides/tuning">
        Customize models with your own training data
      </Card>

      <Card title="Context caching" icon="database" href="/guides/caching">
        Reduce costs and latency by caching large contexts
      </Card>
    </CardGroup>
  </div>

  <div className="mt-16 mb-16 max-w-5xl mx-auto px-6">
    <h2 className="text-3xl font-semibold dark:text-white text-gray-900 mb-4">
      Explore by capability
    </h2>

    <p className="dark:text-gray-400 text-gray-600 mb-8">
      Deep dive into specific features and use cases.
    </p>

    <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
      <a href="/guides/multimodal" className="group block rounded-2xl dark:border-[#27272a] border-gray-200 border dark:hover:border-primary hover:border-primary overflow-hidden no-underline transition-colors">
        <div className="p-6">
          <h3 className="text-base font-semibold dark:text-white text-gray-900 mb-2">
            Multimodal inputs
          </h3>

          <p className="text-sm dark:text-gray-400 text-gray-600 mb-3">
            Process text, images, audio, video, and PDFs in a single request
          </p>

          <div className="flex items-center text-sm dark:text-gray-400 text-gray-600 dark:group-hover:text-primary group-hover:text-primary transition-colors">
            Learn more →
          </div>
        </div>
      </a>

      <a href="/guides/imagen" className="group block rounded-2xl dark:border-[#27272a] border-gray-200 border dark:hover:border-primary hover:border-primary overflow-hidden no-underline transition-colors">
        <div className="p-6">
          <h3 className="text-base font-semibold dark:text-white text-gray-900 mb-2">
            Image generation
          </h3>

          <p className="text-sm dark:text-gray-400 text-gray-600 mb-3">
            Create and edit images with Imagen models
          </p>

          <div className="flex items-center text-sm dark:text-gray-400 text-gray-600 dark:group-hover:text-primary group-hover:text-primary transition-colors">
            Learn more →
          </div>
        </div>
      </a>

      <a href="/guides/veo" className="group block rounded-2xl dark:border-[#27272a] border-gray-200 border dark:hover:border-primary hover:border-primary overflow-hidden no-underline transition-colors">
        <div className="p-6">
          <h3 className="text-base font-semibold dark:text-white text-gray-900 mb-2">
            Video generation
          </h3>

          <p className="text-sm dark:text-gray-400 text-gray-600 mb-3">
            Generate videos from text and images with Veo models
          </p>

          <div className="flex items-center text-sm dark:text-gray-400 text-gray-600 dark:group-hover:text-primary group-hover:text-primary transition-colors">
            Learn more →
          </div>
        </div>
      </a>

      <a href="/guides/json-response" className="group block rounded-2xl dark:border-[#27272a] border-gray-200 border dark:hover:border-primary hover:border-primary overflow-hidden no-underline transition-colors">
        <div className="p-6">
          <h3 className="text-base font-semibold dark:text-white text-gray-900 mb-2">
            Structured output
          </h3>

          <p className="text-sm dark:text-gray-400 text-gray-600 mb-3">
            Generate JSON with schema validation using Pydantic models
          </p>

          <div className="flex items-center text-sm dark:text-gray-400 text-gray-600 dark:group-hover:text-primary group-hover:text-primary transition-colors">
            Learn more →
          </div>
        </div>
      </a>
    </div>
  </div>

  <div className="mt-16 mb-16 max-w-5xl mx-auto px-6">
    <div className="dark:bg-[#1a1d27] bg-gray-50 rounded-2xl p-8 dark:border-[#27272a] border-gray-200 border">
      <h2 className="text-2xl font-semibold dark:text-white text-gray-900 mb-3">
        Ready to get started?
      </h2>

      <p className="dark:text-gray-400 text-gray-600 mb-6">
        Follow the quickstart guide to build your first AI application in minutes.
      </p>

      <a href="/quickstart" className="inline-flex items-center px-6 py-3 rounded-lg font-semibold text-white transition-colors" style={{ backgroundColor: '#238636' }}>
        View Quickstart
      </a>
    </div>
  </div>
</div>
