> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/create_llm.md).

# create\_llm

`imerit_ango.sdk.SDK.`

## create\_llm(llm\_data)

Add an LLM integration to your organization.

### Parameters

* **llm\_data:** LLM
  * An `LLM` object containing the following attributes:
  * **name:** string
    * The display name of the LLM integration.
  * **provider:** LlmProvider
    * The LLM provider. Options:
      * <kbd>LlmProvider.OPENAI</kbd>
      * <kbd>LlmProvider.OPENROUTER</kbd>
  * **model:** string
    * The model name used by the integration.
  * **api\_key:** string
    * The API key for the provider.
  * **base\_url:** string, *Optional, Default None*
    * A custom provider base URL.
  * **is\_streamable:** bool, *Optional, Default False*
    * Whether the model supports streaming responses.

```python
from imerit_ango.models.llm import LLM
from imerit_ango.models.enums import LlmProvider
```

Returns:

* **output:** dict
  * A dictionary containing a `status` field and the created LLM integration in `data.llm`.

{% hint style="info" %}
The response masks the provider API key as `••••••••` in `configuration.apiKey`. Supply the real provider key when creating the integration; the masked value cannot be used as a key.
{% endhint %}

### Example

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.models.enums import LlmProvider
from imerit_ango.models.llm import LLM
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
openai_api_key = os.getenv('OPENAI_API_KEY')

ango_sdk = SDK(api_key)

sdk_response = ango_sdk.create_llm(
    llm_data=LLM(
        name="My OpenAI Account",
        provider=LlmProvider.OPENAI,
        model="gpt-4.1-mini",
        api_key=openai_api_key,
        is_streamable=True,
    )
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/llms/" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "name": "My OpenAI Account",
    "provider": "openai",
    "model": "gpt-4.1-mini",
    "isStreamable": true,
    "configuration": {
      "apiKey": "<OPENAI API KEY>"
    }
  }'
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**See also**

[get\_llms](/sdk/sdk-documentation/organization-level-sdk-functions/get_llms.md), [delete\_llm](/sdk/sdk-documentation/organization-level-sdk-functions/delete_llm.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/create_llm.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
