> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portkey.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LocalAI

> Integrate LocalAI-hosted models with Prisma AIRS AI Gateway for local LLM deployment with observability.

The AI Gateway provides a robust gateway to facilitate the integration of your **locally hosted models through** [**LocalAI**](https://localai.io/).

## Integration Steps

<Steps>
  <Step title="Expose your LocalAI Server">
    Ensure your LocalAI API is externally accessible. If running on `http://localhost`, use a tool like `ngrok` to create a public URL.

    ```sh theme={"system"}
    ngrok http 8080
    ```
  </Step>

  <Step title="Add to Model Catalog">
    1. Go to [**Model Catalog → Add Provider**](https://stratacloudmanager.paloaltonetworks.com/)
    2. Enable **"Local/Privately hosted provider"** toggle
    3. Select **OpenAI** as the provider type (LocalAI follows OpenAI API schema)
    4. Enter your LocalAI URL with `/v1` in **Custom Host**: `https://your-localai.ngrok-free.app/v1`
    5. Name your provider (e.g., `my-localai`)

    <Card title="Complete Setup Guide" icon="book" href="/docs/aigw/product/model-catalog">
      See all setup options
    </Card>
  </Step>

  <Step title="Use in Your Application">
    **Or use custom host directly:**
  </Step>
</Steps>

<Note>
  **Important:**

  * Don't forget to include the version identifier (`/v1`) in the Custom Host URL
  * The AI Gateway supports all endpoints that adhere to the OpenAI specification
</Note>

***

## LocalAI Endpoints Supported

| Endpoint                                        | Resource                                                               |
| :---------------------------------------------- | :--------------------------------------------------------------------- |
| /chat/completions (Chat, Vision, Tools support) | [Doc](/docs/api-reference/inference-api/chat)                               |
| /images/generations                             | [Doc](/docs/api-reference/inference-api/images/create-image)                |
| /embeddings                                     | [Doc](/docs/api-reference/inference-api/embeddings)                         |
| /audio/transcriptions                           | [Doc](/docs/aigw/product/ai-gateway/multimodal-capabilities/speech-to-text) |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Gateway Configs" icon="sliders" href="/docs/aigw/product/ai-gateway">
    Add retries, timeouts, and fallbacks
  </Card>

  <Card title="Observability" icon="chart-line" href="/docs/aigw/product/observability">
    Monitor your LocalAI requests
  </Card>

  <Card title="Custom Host Guide" icon="server" href="/docs/aigw/product/ai-gateway/universal-api#integrating-local-or-private-models">
    Learn more about custom host setup
  </Card>

  <Card title="BYOLLM Guide" icon="book" href="/docs/aigw/integrations/llms/byollm">
    Complete guide for private LLMs
  </Card>
</CardGroup>


## Related topics

- [Overview](/docs/aigw/integrations/llms.md)
- [Custom hosts](/docs/aigw/product/ai-gateway/custom-hosts.md)
- [Anthropic Computer Use](/docs/aigw/integrations/libraries/anthropic-computer-use.md)
- [Deepgram](/docs/aigw/integrations/llms/deepgram.md)
- [Ollama](/docs/aigw/integrations/llms/ollama.md)
