> 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/api/docs/llms.md).

# LLMs

LLM integrations used by chat and copilot projects

## List LLM Integrations

> Lists the LLM integrations of your organization. The response carries \`configuration.apiKey\`, so treat it as a secret.

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"LLMs","description":"LLM integrations used by chat and copilot projects"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"parameters":{"PageParam":{"name":"page","in":"query","schema":{"type":"integer","minimum":1},"description":"Page number (1-indexed). Sending it without `limit` sets the page size to 10. Without it no rows are skipped."},"LimitParam":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1},"description":"Items per page. Not capped by the server. Without it and without `page`, every matching row is returned; `listProjects` is the exception, see its own description."},"SortParam":{"name":"sort","in":"query","schema":{"type":"string"},"description":"Sort field, prefix with `-` for descending. No server-side default: without it rows come back in natural order."}},"schemas":{"LLMListResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"llms":{"type":"array","items":{"$ref":"#/components/schemas/LLM"}},"total":{"type":"integer","description":"Number of integrations matching the filter, ignoring pagination"}}}}},"LLM":{"type":"object","description":"`configuration` is stored hidden but these endpoints put `apiKey` back into the response, so the payload contains the provider credential.","properties":{"_id":{"type":"string"},"id":{"type":"string","description":"Same value as `_id`"},"name":{"type":"string"},"provider":{"type":"string","enum":["openrouter","openai","pluto","llama-meta","openai_api_compatible"]},"model":{"type":"string","nullable":true},"isStreamable":{"type":"boolean"},"configuration":{"type":"object","properties":{"apiKey":{"type":"string","description":"Provider API key"},"baseUrl":{"type":"string","description":"Present only when the integration was created with one"}}},"organization":{"type":"string"},"createdBy":{"type":"string","description":"Email of the member who created the integration"},"createdAt":{"type":"string","format":"date-time"},"deleted":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"BadRequestError":{"description":"Bad request - validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnauthorizedError":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ForbiddenError":{"description":"Forbidden - insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/llms":{"get":{"tags":["LLMs"],"summary":"List LLM Integrations","description":"Lists the LLM integrations of your organization. The response carries `configuration.apiKey`, so treat it as a secret.","operationId":"listLLMs","parameters":[{"$ref":"#/components/parameters/PageParam"},{"$ref":"#/components/parameters/LimitParam"},{"$ref":"#/components/parameters/SortParam"},{"name":"provider","in":"query","schema":{"type":"string"},"description":"Filter by provider. Any other LLM field works as a filter too."},{"name":"filter","in":"query","schema":{"type":"string"},"description":"JSON object for operator based filtering. Invalid JSON returns 400."}],"responses":{"200":{"description":"LLM integrations retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMListResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"}}}}}}
```

## Create LLM Integration

> Registers an LLM integration for your organization. The organization and the creator are taken from the API key, so sending them has no effect, and any field outside the ones below is ignored. The response echoes \`configuration.apiKey\`. Leaving out \`name\` or \`provider\` currently surfaces as a 500 rather than a validation error.

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"LLMs","description":"LLM integrations used by chat and copilot projects"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"LLMCreateRequest":{"type":"object","required":["name","provider"],"properties":{"name":{"type":"string"},"provider":{"type":"string","enum":["openai","openrouter"],"description":"Other values are stored without complaint but have no runtime implementation, so the integration fails the first time a project uses it."},"model":{"type":"string","description":"Provider model id, for example `gpt-4o`"},"isStreamable":{"type":"boolean","default":false},"configuration":{"type":"object","description":"Provider credentials. Only `apiKey` and `baseUrl` come back in responses.","properties":{"apiKey":{"type":"string"},"baseUrl":{"type":"string","description":"Base URL of the provider endpoint, when it is not the provider default"}}}}},"LLMResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"llm":{"$ref":"#/components/schemas/LLM"}}}}},"LLM":{"type":"object","description":"`configuration` is stored hidden but these endpoints put `apiKey` back into the response, so the payload contains the provider credential.","properties":{"_id":{"type":"string"},"id":{"type":"string","description":"Same value as `_id`"},"name":{"type":"string"},"provider":{"type":"string","enum":["openrouter","openai","pluto","llama-meta","openai_api_compatible"]},"model":{"type":"string","nullable":true},"isStreamable":{"type":"boolean"},"configuration":{"type":"object","properties":{"apiKey":{"type":"string","description":"Provider API key"},"baseUrl":{"type":"string","description":"Present only when the integration was created with one"}}},"organization":{"type":"string"},"createdBy":{"type":"string","description":"Email of the member who created the integration"},"createdAt":{"type":"string","format":"date-time"},"deleted":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"UnauthorizedError":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ForbiddenError":{"description":"Forbidden - insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/llms":{"post":{"tags":["LLMs"],"summary":"Create LLM Integration","description":"Registers an LLM integration for your organization. The organization and the creator are taken from the API key, so sending them has no effect, and any field outside the ones below is ignored. The response echoes `configuration.apiKey`. Leaving out `name` or `provider` currently surfaces as a 500 rather than a validation error.","operationId":"createLLM","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMCreateRequest"}}}},"responses":{"201":{"description":"LLM integration created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"}}}}}}
```

## Delete LLM Integration

> Soft deletes an LLM integration. It stops appearing in the list, and projects still pointing at it keep the stored reference. The response carries the deleted integration with \`deleted\` already true, including \`configuration.apiKey\`.

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"LLMs","description":"LLM integrations used by chat and copilot projects"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"LLMResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"llm":{"$ref":"#/components/schemas/LLM"}}}}},"LLM":{"type":"object","description":"`configuration` is stored hidden but these endpoints put `apiKey` back into the response, so the payload contains the provider credential.","properties":{"_id":{"type":"string"},"id":{"type":"string","description":"Same value as `_id`"},"name":{"type":"string"},"provider":{"type":"string","enum":["openrouter","openai","pluto","llama-meta","openai_api_compatible"]},"model":{"type":"string","nullable":true},"isStreamable":{"type":"boolean"},"configuration":{"type":"object","properties":{"apiKey":{"type":"string","description":"Provider API key"},"baseUrl":{"type":"string","description":"Present only when the integration was created with one"}}},"organization":{"type":"string"},"createdBy":{"type":"string","description":"Email of the member who created the integration"},"createdAt":{"type":"string","format":"date-time"},"deleted":{"type":"boolean"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["fail","error"]},"message":{"type":"string"}}}},"responses":{"UnauthorizedError":{"description":"Unauthorized - invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"ForbiddenError":{"description":"Forbidden - insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/llms/{llmId}":{"delete":{"tags":["LLMs"],"summary":"Delete LLM Integration","description":"Soft deletes an LLM integration. It stops appearing in the list, and projects still pointing at it keep the stored reference. The response carries the deleted integration with `deleted` already true, including `configuration.apiKey`.","operationId":"deleteLLM","parameters":[{"name":"llmId","in":"path","required":true,"schema":{"type":"string"},"description":"LLM integration ID"}],"responses":{"200":{"description":"LLM integration deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"description":"No such integration, or it belongs to another organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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/api/docs/llms.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.
