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

# Models, Endpoints, and Pricing

> Compare Inception models including Mercury 2 and Mercury Edit 2.

<Card title="Start Free with 100M Tokens (up from 10M)" icon="sparkles">
  <Info>
    Every new account includes ~~10 million~~ → 100 million free tokens.
  </Info>
</Card>

## Production Models

| Model              | Input Price (1M Tokens) | Cached Input Price (1M Tokens) | Output Price (1M Tokens) | Supported Endpoints                             | Context Window              | Features                                 | Supported Formats |
| ------------------ | ----------------------- | ------------------------------ | :----------------------- | ----------------------------------------------- | --------------------------- | ---------------------------------------- | ----------------- |
| **Mercury 2**      | \$0.25                  | \$0.025                        | \$0.75                   | `v1/chat/completions`                           | Chat: 128K                  | `Tool Calling`<br />`Structured Outputs` | `Text`            |
| **Mercury Edit 2** | \$0.25                  | \$0.025                        | \$0.75                   | `v1/fim/completions`<br />`v1/edit/completions` | FIM: 32K<br />NextEdit: 32K |                                          | `Text`            |

<Tabs>
  <Tab title="Mercury 2">
    The fastest reasoning LLM and our most powerful model.

    Export your API key as an environment variable in your terminal.

    <CodeGroup>
      ```bash macOS / Linux theme={null}
      export INCEPTION_API_KEY="your_api_key_here"
      ```

      ```bash Windows theme={null}
      set INCEPTION_API_KEY="your_api_key_here"
      ```
    </CodeGroup>

    ## Example Usage

    ### Chat Completions

    `v1/chat/completions`

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.inceptionlabs.ai/v1/chat/completions \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $INCEPTION_API_KEY" \
        -d '{
          "model": "mercury-2",
          "messages": [
            {"role": "user", "content": "What is a diffusion model?"}
          ],
          "max_tokens": 10000
        }'
      ```

      ```python Python theme={null}
      from inceptionai import Inception

      client = Inception()  # reads INCEPTION_API_KEY from the environment

      completion = client.chat.completions.create(
          model="mercury-2",
          messages=[{"role": "user", "content": "What is a diffusion model?"}],
          max_tokens=10000,
      )
      print(completion.choices[0].message.content)
      ```

      ```typescript TypeScript theme={null}
      import Inception from 'inceptionai';

      const client = new Inception(); // reads INCEPTION_API_KEY from the environment

      const completion = await client.chat.completions.create({
        model: 'mercury-2',
        messages: [{ role: 'user', content: 'What is a diffusion model?' }],
        max_tokens: 10000,
      });
      console.log(completion.choices[0]?.message.content);
      ```
    </CodeGroup>
  </Tab>

  <Tab title="Mercury Edit 2">
    A code editing LLM for autocomplete (FIM) and next edit suggestions.

    Export your API key as an environment variable in your terminal.

    <CodeGroup>
      ```bash macOS / Linux theme={null}
      export INCEPTION_API_KEY="your_api_key_here"
      ```

      ```bash Windows theme={null}
      set INCEPTION_API_KEY="your_api_key_here"
      ```
    </CodeGroup>

    ## Example Usage

    ### Autocomplete

    `v1/fim/completions`

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.inceptionlabs.ai/v1/fim/completions \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $INCEPTION_API_KEY" \
        -d '{
          "model": "mercury-edit-2",
          "prompt": "def fibonacci(",
          "suffix": "return a + b",
          "max_tokens": 1000
        }'
      ```

      ```python Python theme={null}
      from inceptionai import Inception

      client = Inception()  # reads INCEPTION_API_KEY from the environment

      completion = client.fim.completions.create(
          model="mercury-edit-2",
          prompt="def fibonacci(",
          suffix="return a + b",
          max_tokens=1000,
      )
      print(completion.choices[0].text)
      ```

      ```typescript TypeScript theme={null}
      import Inception from 'inceptionai';

      const client = new Inception(); // reads INCEPTION_API_KEY from the environment

      const completion = await client.fim.completions.create({
        model: 'mercury-edit-2',
        prompt: 'def fibonacci(',
        suffix: 'return a + b',
        max_tokens: 1000,
      });
      console.log(completion.choices[0]?.text);
      ```
    </CodeGroup>

    ### Next-Edit

    `v1/edit/completions`

    <CodeGroup>
      ```bash cURL theme={null}
      curl https://api.inceptionlabs.ai/v1/edit/completions \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer $INCEPTION_API_KEY" \
        --data-binary @- <<'JSON'
      {
        "model": "mercury-edit-2",
        "messages": [
          {"role": "user", "content": "<|recently_viewed_code_snippets|>\n\n<|/recently_viewed_code_snippets|>\n\n<|current_file_content|>\ncurrent_file_path: solver.py\n'''\nfunction: flagAllNeighbors\n----------\nThis function marks each of the covered neighbors of the cell at the given row\n<|code_to_edit|>\nand col as flagged.\n'''\ndef flagAllNeighbors(board<|cursor|>, row, col): \n for r, c in b.getNeighbors(row, col):\n if b.isValid(r, c):\n b.flag(r, c)\n\n<|/code_to_edit|>\n<|/current_file_content|>\n\n<|edit_diff_history|>\n--- /c:/Users/test/testing/solver.py\n+++ /c:/Users/test/testing/solver.py\n@@ -6,1 +6,1 @@\n-def flagAllNeighbors(b, row, col): \n+def flagAllNeighbors(board, row, col): \n\n<|/edit_diff_history|>"}
        ],
        "max_tokens": 1000
      }
      JSON
      ```

      ```python Python theme={null}
      from inceptionai import Inception

      client = Inception()  # reads INCEPTION_API_KEY from the environment

      completion = client.edit.completions.create(
          model="mercury-edit-2",
          messages=[
              {"role": "user", "content": "<|recently_viewed_code_snippets|>\n\n<|/recently_viewed_code_snippets|>\n\n<|current_file_content|>\ncurrent_file_path: solver.py\n'''\nfunction: flagAllNeighbors\n----------\nThis function marks each of the covered neighbors of the cell at the given row\n<|code_to_edit|>\nand col as flagged.\n'''\ndef flagAllNeighbors(board<|cursor|>, row, col): \n for r, c in b.getNeighbors(row, col):\n if b.isValid(r, c):\n b.flag(r, c)\n\n<|/code_to_edit|>\n<|/current_file_content|>\n\n<|edit_diff_history|>\n--- /c:/Users/test/testing/solver.py\n+++ /c:/Users/test/testing/solver.py\n@@ -6,1 +6,1 @@\n-def flagAllNeighbors(b, row, col): \n+def flagAllNeighbors(board, row, col): \n\n<|/edit_diff_history|>"}
          ],
          max_tokens=1000,
      )
      print(completion.choices[0].message.content)
      ```

      ```typescript TypeScript theme={null}
      import Inception from 'inceptionai';

      const client = new Inception(); // reads INCEPTION_API_KEY from the environment

      const completion = await client.edit.completions.create({
        model: 'mercury-edit-2',
        messages: [
          { role: 'user', content: '<|recently_viewed_code_snippets|>\n\n<|/recently_viewed_code_snippets|>\n\n<|current_file_content|>\ncurrent_file_path: solver.py\n\'\'\'\nfunction: flagAllNeighbors\n----------\nThis function marks each of the covered neighbors of the cell at the given row\n<|code_to_edit|>\nand col as flagged.\n\'\'\'\ndef flagAllNeighbors(board<|cursor|>, row, col): \n for r, c in b.getNeighbors(row, col):\n if b.isValid(r, c):\n b.flag(r, c)\n\n<|/code_to_edit|>\n<|/current_file_content|>\n\n<|edit_diff_history|>\n--- /c:/Users/test/testing/solver.py\n+++ /c:/Users/test/testing/solver.py\n@@ -6,1 +6,1 @@\n-def flagAllNeighbors(b, row, col): \n+def flagAllNeighbors(board, row, col): \n\n<|/edit_diff_history|>' }
        ],
        max_tokens: 1000,
      });
      console.log(completion.choices[0]?.message.content);
      ```
    </CodeGroup>
  </Tab>
</Tabs>
