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

<div className="bg-white dark:bg-[#0f1117] min-h-screen">
  <div className="bg-gradient-to-br from-[#0B6CBF] to-[#3b73a4] dark:from-[#1a1d27] dark:to-[#0f1117] py-20">
    <div className="max-w-6xl mx-auto px-6 lg:px-8">
      <div className="text-center">
        <h1 className="text-4xl sm:text-5xl lg:text-6xl font-bold text-white dark:text-gray-100 mb-6">
          OpenAI Python SDK
        </h1>

        <p className="text-lg sm:text-xl text-white/90 dark:text-gray-300 max-w-2xl mx-auto mb-8">
          The official Python library for the OpenAI API. Build powerful AI applications with type-safe, async-ready client libraries.
        </p>

        <div className="flex flex-col sm:flex-row gap-4 justify-center items-center flex-wrap">
          <a href="/quickstart" className="inline-block bg-[#fbd342] hover:bg-[#e4c238] text-gray-900 font-semibold px-8 py-3 rounded transition-colors no-underline">
            Get Started
          </a>

          <a href="/api/client" className="inline-block border-2 border-white/30 bg-white/10 hover:bg-white/20 text-white font-semibold px-8 py-3 rounded transition-colors no-underline">
            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 text-gray-900 dark:text-white mb-4">Quick Start</h2>
    <p className="text-base text-gray-600 dark:text-gray-400 mb-8">Get up and running with the OpenAI Python SDK in minutes</p>

    <Steps>
      <Step title="Install the package">
        Install the OpenAI Python library using pip:

        ```bash theme={null}
        pip install openai
        ```
      </Step>

      <Step title="Set your API key">
        Export your OpenAI API key as an environment variable:

        ```bash theme={null}
        export OPENAI_API_KEY='your-api-key-here'
        ```

        <Info>Get your API key from the [OpenAI Platform](https://platform.openai.com/settings/organization/api-keys)</Info>
      </Step>

      <Step title="Make your first API call">
        Create a simple script to generate text using the Responses API:

        ```python theme={null}
        from openai import OpenAI

        client = OpenAI()

        response = client.responses.create(
            model="gpt-5.2",
            instructions="You are a helpful assistant.",
            input="Explain the theory of relativity in simple terms."
        )

        print(response.output_text)
        ```
      </Step>
    </Steps>
  </div>

  <div className="mt-16 mb-16 max-w-5xl mx-auto px-6">
    <h2 className="text-3xl font-semibold text-gray-900 dark:text-white mb-4">Explore the SDK</h2>
    <p className="text-base text-gray-600 dark:text-gray-400 mb-8">Discover the powerful features of the OpenAI Python SDK</p>

    <CardGroup cols={3}>
      <Card title="Responses API" icon="message" href="/api/responses/create">
        Generate text with the modern Responses API
      </Card>

      <Card title="Chat Completions" icon="comments" href="/api/chat/completions">
        Create conversational AI experiences
      </Card>

      <Card title="Audio" icon="microphone" href="/api/audio/speech">
        Convert text to speech and transcribe audio
      </Card>

      <Card title="Images" icon="image" href="/api/images/generate">
        Generate and edit images with AI
      </Card>

      <Card title="Embeddings" icon="vector-square" href="/api/embeddings/create">
        Create vector representations of text
      </Card>

      <Card title="Assistants" icon="robot" href="/api/assistants/create">
        Build stateful AI assistants with threads
      </Card>
    </CardGroup>
  </div>

  <div className="mt-16 mb-16 max-w-5xl mx-auto px-6">
    <h2 className="text-3xl font-semibold text-gray-900 dark:text-white mb-4">Core Features</h2>
    <p className="text-base text-gray-600 dark:text-gray-400 mb-8">Everything you need to build production-ready AI applications</p>

    <CardGroup cols={2}>
      <Card title="Type Safety" icon="shield-check" href="/concepts/client">
        Full type definitions for all request and response fields
      </Card>

      <Card title="Async Support" icon="bolt" href="/concepts/async">
        Native async/await support for high-performance applications
      </Card>

      <Card title="Streaming" icon="water" href="/concepts/streaming">
        Stream responses in real-time for better UX
      </Card>

      <Card title="Error Handling" icon="triangle-exclamation" href="/concepts/error-handling">
        Comprehensive error types and retry logic
      </Card>

      <Card title="Azure OpenAI" icon="cloud" href="/guides/azure-openai">
        Seamless integration with Azure OpenAI Service
      </Card>

      <Card title="Helpers" icon="wrench" href="/guides/helpers">
        Utility functions and event handlers
      </Card>
    </CardGroup>
  </div>

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

      <p className="text-gray-600 dark:text-gray-400 mb-6">
        Start building powerful AI applications with the OpenAI Python SDK today.
      </p>

      <a href="/quickstart" className="inline-block bg-[#0b6dbf] hover:bg-[#0a5fa8] text-white font-semibold px-8 py-3 rounded transition-colors no-underline">
        Get Started
      </a>
    </div>
  </div>
</div>
