# OpenAI (/docs/providers/openai)


Overview [#overview]

[OpenAI](https://openai.com) is a leading AI research organization providing a comprehensive suite of AI models including GPT series, DALL-E, Whisper, and more.

**Official Website:** [https://openai.com](https://openai.com)
&#x2A;*API Documentation:** [https://platform.openai.com/docs](https://platform.openai.com/docs)

Key Features [#key-features]

* **Chat Completions** — Text generation with function calling support
* **Responses API** — Enhanced interface with reasoning control
* **Realtime API** — Low-latency bidirectional audio communication
* **Vision** — Image analysis and understanding
* **Image Generation** — DALL-E image creation
* **Audio** — Whisper speech-to-text and TTS text-to-speech
* **Embeddings** — Text embeddings for semantic search

Usage Example [#usage-example]

<Tabs items="[&#x22;Python&#x22;, &#x22;JavaScript&#x22;, &#x22;cURL&#x22;]">
  <Tab value="Python">
    ```python
    from openai import OpenAI

    client = OpenAI(
        api_key="YOUR_API_KEY",
        base_url="https://api.yuhuanstudio.com/v1"
    )

    response = client.chat.completions.create(
        model="model-id",
        messages=[
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Hello!"}
        ]
    )

    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab value="JavaScript">
    ```javascript
    import OpenAI from "openai";

    const client = new OpenAI({
      apiKey: "YOUR_API_KEY",
      baseURL: "https://api.yuhuanstudio.com/v1",
    });

    const response = await client.chat.completions.create({
      model: "model-id",
      messages: [
        { role: "system", content: "You are a helpful assistant." },
        { role: "user", content: "Hello!" },
      ],
    });

    console.log(response.choices[0].message.content);
    ```
  </Tab>

  <Tab value="cURL">
    ```bash
    curl https://api.yuhuanstudio.com/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
        "model": "model-id",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Hello!"}
        ]
      }'
    ```
  </Tab>
</Tabs>

Available Models [#available-models]

Use the [Models API](/docs/models-api) to query available models:

```bash
curl https://api.yuhuanstudio.com/v1/models?provider=openai \
  -H "Authorization: Bearer YOUR_API_KEY"
```

<Callout type="info">
  Models and pricing are synced automatically from OpenAI. Check the dashboard for current availability and rates.
</Callout>

Official Resources [#official-resources]

* [OpenAI Platform](https://platform.openai.com)
* [API Documentation](https://platform.openai.com/docs/api-reference)
* [Pricing](https://openai.com/pricing)
