# Prem App

You can easily run local embedding models using [Prem app](https://www.premai.io/#PremApp). 
It creates a local server that exposes a REST API with the same interface as 
the OpenAI API.

```dart
const localUrl = 'http://localhost:8000'; // Check Prem app for the actual URL
final embeddings = OpenAIEmbeddings(baseUrl: localUrl);
const text = 'This is a test document.';
final res = await embeddings.embedQuery(text);
final res = await embeddings.embedDocuments([text]);
```
