---
title: Use RunAPI in Grok Build — Custom Model Configuration Guide | RunAPI
description: Configure Grok Build with RunAPI using xAI's documented custom model fields, an environment-backed API key, and a RunAPI model guide.
url: https://runapi.ai/grok-build.md
canonical: https://runapi.ai/grok-build
locale: en
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
alternates:
  en: https://runapi.ai/grok-build
  zh-CN: https://runapi.ai/zh-CN/grok-build
  es: https://runapi.ai/es/grok-build
  ja: https://runapi.ai/ja/grok-build
  de: https://runapi.ai/de/grok-build
  fr: https://runapi.ai/fr/grok-build
  pt-BR: https://runapi.ai/pt-BR/grok-build
  ko: https://runapi.ai/ko/grok-build
  it: https://runapi.ai/it/grok-build
  nl: https://runapi.ai/nl/grok-build
  pl: https://runapi.ai/pl/grok-build
  tr: https://runapi.ai/tr/grok-build
  zh-TW: https://runapi.ai/zh-TW/grok-build
  zh-HK: https://runapi.ai/zh-HK/grok-build
  ar: https://runapi.ai/ar/grok-build
  x-default: https://runapi.ai/grok-build
---

> HTML version: https://runapi.ai/grok-build
> Site index for agents: https://runapi.ai/llms.txt


# Use RunAPI in Grok Build.

Grok Build supports custom model configuration through base_url and env_key. Point the documented TOML shape at RunAPI, keep the key in RUNAPI_API_KEY, and choose a catalog-backed model guide.

- [Get API Key](https://runapi.ai/login)
- [Browse models](https://runapi.ai/models.md)

> This page separates official configuration facts from runtime evidence. The repository did not run a paid upstream request or a real Grok Build session in this work, so the example is not a claim of successful inference.

## config.toml

```toml
[model.runapi]
model = "gpt-5.5"
name = "RunAPI GPT 5.5"
base_url = "https://runapi.ai/v1"
env_key = "RUNAPI_API_KEY"

[models]
default = "runapi"
```

## Commands

```bash
export RUNAPI_API_KEY="runapi_xxx"
grok --version
grok
```

## Configure the documented custom model shape

1. **Set the API key in the environment** — Export RUNAPI_API_KEY in the same environment that launches Grok Build. Do not put a live key in config.toml or source control. `export RUNAPI_API_KEY="runapi_xxx"`
2. **Add the RunAPI model entry** — Use the fields documented by xAI: model, name, base_url, and env_key. Keep the default pointing at the named model entry. `[model.runapi]`
3. **Review locally before a session** — Check the installed CLI version and inspect the generated configuration locally. A local check does not prove a RunAPI request or model response. `grok --version`

## Choose a RunAPI model for Grok Build

The guide list is projected from the RunAPI catalog. Each guide shows the current model IDs and public endpoints rather than promising that every catalog variant has been runtime-tested with Grok Build.

- [GPT](https://runapi.ai/grok-build-gpt.md) — Text · OpenAI

## Grok Bot is a separate Cursor-hosted product.

xAI documents Grok Bot as a Cursor-connected product whose Bots run on persistent cloud computers. The public documentation does not expose the custom base_url or model-picker configuration documented for Grok Build, so this page does not promise RunAPI routing for Grok Bot.

[Read the official Grok Bot documentation](https://docs.x.ai/grok-bot/overview)

## Configuration fields

| Field | Value | Purpose |
| --- | --- | --- |
| `model.runapi.model` | `gpt-5.5` | Selects the RunAPI catalog model for the custom entry. |
| `model.runapi.base_url` | `https://runapi.ai/v1` | Points the documented OpenAI-compatible base URL at RunAPI. |
| `model.runapi.env_key` | `RUNAPI_API_KEY` | Reads the credential from the environment instead of hardcoding it. |
| `models.default` | `runapi` | Selects the named custom model entry as the default. |

## Grok Build configuration questions

### Does this page claim that Grok Build has completed a RunAPI inference?

No. The TOML shape follows xAI's public Grok Build documentation, while a real RunAPI request requires a separately authorized runtime check. This work did not make a paid request.
### Where should I store the RunAPI key?

Set RUNAPI_API_KEY in the environment that starts Grok Build. The env_key field tells the local configuration which variable to read.
### Can Grok Bot use this configuration as its own model selector?

No such claim is made. xAI's Grok Bot documentation describes a Cursor-managed model and does not document a customer-controlled base_url or model selector.

## Official sources

- [Grok Build official documentation](https://docs.x.ai/build/overview)
- [xAI API models](https://docs.x.ai/developers/models)

Create or sign in to a RunAPI account, review the current model catalog, and keep runtime verification separate from this public configuration reference.


---

## More from RunAPI

- [Home](https://runapi.ai/.md)
### Product
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models#all-models)
### Developers
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [x402](https://runapi.ai/x402.md)
### Guides
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
### Company
- [Enterprise](https://runapi.ai/contact.md)
- [Contact](https://runapi.ai/contact.md)
### Legal
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "SoftwareApplication",
    "name": "RunAPI",
    "applicationCategory": "DeveloperApplication",
    "description": "Configure Grok Build with RunAPI using xAI's documented custom model fields, an environment-backed API key, and a RunAPI model guide.",
    "url": "https://runapi.ai/grok-build"
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "Does this page claim that Grok Build has completed a RunAPI inference?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "No. The TOML shape follows xAI's public Grok Build documentation, while a real RunAPI request requires a separately authorized runtime check. This work did not make a paid request."
        }
      },
      {
        "@type": "Question",
        "name": "Where should I store the RunAPI key?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Set RUNAPI_API_KEY in the environment that starts Grok Build. The env_key field tells the local configuration which variable to read."
        }
      },
      {
        "@type": "Question",
        "name": "Can Grok Bot use this configuration as its own model selector?",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "No such claim is made. xAI's Grok Bot documentation describes a Cursor-managed model and does not document a customer-controlled base_url or model selector."
        }
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "HowTo",
    "step": [
      {
        "@type": "HowToStep",
        "position": 1,
        "name": "Set the API key in the environment",
        "text": "Export RUNAPI_API_KEY in the same environment that launches Grok Build. Do not put a live key in config.toml or source control."
      },
      {
        "@type": "HowToStep",
        "position": 2,
        "name": "Add the RunAPI model entry",
        "text": "Use the fields documented by xAI: model, name, base_url, and env_key. Keep the default pointing at the named model entry."
      },
      {
        "@type": "HowToStep",
        "position": 3,
        "name": "Review locally before a session",
        "text": "Check the installed CLI version and inspect the generated configuration locally. A local check does not prove a RunAPI request or model response."
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://runapi.ai/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "RunAPI",
        "item": "https://runapi.ai/grok-build"
      }
    ]
  }
]
```
