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

# LLM Providers

> Choose your LLM provider

## ContextForce

<Card title="ContextForce" img="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-contextforce.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=8877ee0ac5d0e2c408d4d7f436771758" width="1698" height="874" data-path="images/llm/lexi-llm-contextforce.jpg">
  Contextforce uses a smart semantic router that picks the best AI model to fulfill your request at runtime. We run a lab to determine what model is best for your task based on a set of criteria like user level, types of tasks, speed, cost, context size and more.

  <br />

  For free users, your request is likely to be handled by one of the following models: gpt-4o-mini, deepseek-v3, gemini-1.5-flash, llama 3.3 70B, Llama 3.1+, gpt-3.5-turbo, etc. It costs you minimum 1 credit per request.

  <br />

  For paid users, more advanced models are included like gpt-o1, gpt-o3-mini, deepseek-r1, gemini-1.5-pro, etc.

  <br />

  For developers that have their own way to access frontier models, you can use our service to bring the web data to your model for free. Simple follow the instruction below to set it up.

  <br />
</Card>

## OpenAI

<Card title="OpenAI" img="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-openai.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=1d47643a72ac60a47fa642665f4b132c" width="1656" height="1100" data-path="images/llm/lexi-llm-openai.jpg">
  Go to OpenAI to get your API key (Link: [https://platform.openai.com](https://platform.openai.com))
</Card>

### Obtain OpenAI API Key

<img src="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-openai-apikey.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=3e43fda9f2773efc671596df1fdf364c" alt="OpenAI API Key" width="1828" height="1528" data-path="images/llm/lexi-llm-openai-apikey.jpg" />

## Gemini

<Card title="Gemini" img="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-gemini.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=1c48b076b3865274533b2387db2f2d1e" width="1648" height="1120" data-path="images/llm/lexi-llm-gemini.jpg">
  Go to Gemini to get your API key. (Link: [https://aistudio.google.com/](https://aistudio.google.com/))
</Card>

### Obtain Gemini API Key

<img src="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-gemini-apikey.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=cf0ee5678a0561d72b7028e43249b121" alt="Gemini API Key" width="2574" height="1544" data-path="images/llm/lexi-llm-gemini-apikey.jpg" />

## OpenAI Compatible

<Card title="OpenAI Compatible API" img="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-openai-compatible.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=7d92d1414e3bddcc33a7d388d069bdd5" width="1776" height="1122" data-path="images/llm/lexi-llm-openai-compatible.jpg">
  There are many models online have provided OpenAI Compatible API for developers to test their modelswithout writing custom integration code. Contextforce has integrated many of them thru this.
</Card>

### Local LLM

You can now use LLMStudio to download and run the distrilled DeepSeek R1 or other open source models locally. When your model is live, we can communicate with it via the OpenAI compatible API. Please follow the instruction below to obtain the connection info.

#### Download DeepSeek R1 distrilled model and run it locally

<Card img="https://mintcdn.com/contextforcecom-0e8f4a7e/rsa8ltI4dRycwAvn/images/llm/lexi-llm-local.jpg?fit=max&auto=format&n=rsa8ltI4dRycwAvn&q=85&s=fd433e16d5b52e72a628bdd59959375a" width="2600" height="1726" data-path="images/llm/lexi-llm-local.jpg" />

#### Obtain the connection info: model and base url

```shell theme={null}
curl http://localhost:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-r1-distill-llama-8b",
    "messages": [
      { "role": "system", "content": "Always answer in rhymes. Today is Thursday" },
      { "role": "user", "content": "What day is it today?" }
    ],
    "temperature": 0.7,
    "max_tokens": -1,
    "stream": false
}'
```
