---
title: SpaceXAI: Grok 4.7 (batch) API | Text Generation | ModelsLab
description: Build with SpaceXAI: Grok 4.7 (batch) API by xAI. Text generation, chat, code, and reasoning. Plans from $21/month.
url: https://modelslab.com/models/x-ai/x-ai-grok-4.7-batch.md
canonical: https://modelslab.com/models/x-ai/x-ai-grok-4.7-batch
type: product
component: Playground/LLM/Index
generated_at: 2026-11-10T13:04:20.328723Z
---

SpaceXAI: Grok 4.7 (batch)
---

 [LLMs.txt](https://modelslab.com/models/x-ai/x-ai-grok-4.7-batch/llms.txt) [.md](https://modelslab.com/models/x-ai/x-ai-grok-4.7-batch.md)

SpaceXAI: Grok 4.7 (batch)
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

images, PDFs and text files

Send

### SpaceXAI: Grok 4.7 (batch)

x-ai x-ai-grok-4.7-batch

Copy model ID

PricingInput $1.60 / 1M tokens

Output $4.80 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens4000

Top P0.9

Frequency Penalty0

Presence Penalty0

Thinkinglow

lowmediumhigh

Deeper thinking spends more of the Max Tokens budget before the answer starts.

Model Info

Support

Looking for something different?
---

Models that trade off differently against the one you are viewing

### Better quality

Newer flagship models that generally produce stronger results.

[OpenAI](https://modelslab.com/models/openai)

 [GPT 5.2](https://modelslab.com/models/openai/gpt-5.2)

[OpenAI](https://modelslab.com/models/openai)

 [GPT 5.1](https://modelslab.com/models/openai/gpt5.1)

[OpenAI](https://modelslab.com/models/openai)

 [GPT-5.1-Codex-Max](https://modelslab.com/models/openai/gpt-5.1-codex-max)

### Lower cost per run

Open-source models we host, unlimited on the $149/month plan.

[ModelsLab](https://modelslab.com/models/modelslab) Popular

 [Modelslab: Custom LLM](https://modelslab.com/models/modelslab/uncensored-chat)Open Source Model

[Qwen](https://modelslab.com/models/open_router)

 [Qwen: Qwen3 235B A22B Instruct 2507](https://modelslab.com/models/qwen/qwen-qwen3-235b-a22b-2507)Closed Source Model

[Google](https://modelslab.com/models/google)

 [Gemini 2.5 Flash](https://modelslab.com/models/google/gemini-2.5-flash)Closed Source Model

[OpenAI](https://modelslab.com/models/openai)

 [gpt-oss-20b](https://modelslab.com/models/openai/gpt-oss-20b)Closed Source Model

[DeepSeek](https://modelslab.com/models/open_router)

 [DeepSeek: DeepSeek V4 Flash 0423](https://modelslab.com/models/deepseek/deepseek-deepseek-v4-flash)Closed Source Model

[Google](https://modelslab.com/models/open_router)

 [Google: Gemini 3.1 Flash Lite](https://modelslab.com/models/google/google-gemini-3.1-flash-lite)Closed Source Model

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[#### Thinking Machines/Thinking Machines: Inkling Small

thinkingmachines-inkling-small

From $0.82/M tokens](https://modelslab.com/models/thinkingmachines/thinkingmachines-inkling-small)

[#### Z.ai/Z.ai: GLM 5.3

z-ai-glm-5.3

From $0.73/M tokens](https://modelslab.com/models/z-ai/z-ai-glm-5.3)

[#### Liquid/LiquidAI: LFM3-1.7B

liquid-lfm-3-1.7b

From $0.14/M tokens](https://modelslab.com/models/liquid/liquid-lfm-3-1.7b)

[#### Google/Google: Gemini Omni 1.1 Flash

google-gemini-omni-1.1-flash

From $5.25/M tokens](https://modelslab.com/models/google/google-gemini-omni-1.1-flash)

[#### OpenAI/OpenAI: GPT-4o (2024-08-06)

openai-gpt-4o-2024-08-06

From $6.25/M tokens](https://modelslab.com/models/openai/openai-gpt-4o-2024-08-06)

[#### Meta/Meta: Muse Spark Open

meta-muse-spark-open

From $2.75/M tokens](https://modelslab.com/models/meta/meta-muse-spark-open)

[#### NVIDIA/NVIDIA: Nemotron 3.5 Super VL

nvidia-nemotron-3.5-super-vl

From $0.31/M tokens](https://modelslab.com/models/nvidia/nvidia-nemotron-3.5-super-vl)

[#### Qwen/Qwen: Qwen3 14B

qwen-qwen3-14b

From $0.16/M tokens](https://modelslab.com/models/qwen/qwen-qwen3-14b)

[#### Meta/Llama 4 Scout Instruct (17Bx16E)

meta-llama-Llama-4-Scout-17B-16E-Instruct

From $0.39/M tokens](https://modelslab.com/models/meta/meta-llama-Llama-4-Scout-17B-16E-Instruct)

[#### Google/Google: Nano Banana Pro (Gemini 3 Pro Image)

google-gemini-3-pro-image

From $7.00/M tokens](https://modelslab.com/models/google/google-gemini-3-pro-image)

[#### OpenAI/OpenAI: GPT Sol Latest

openai-gpt-sol-latest

From $6.00/M tokens](https://modelslab.com/models/openai/openai-gpt-sol-latest)

[#### Qwen/Qwen2-VL (72B) Instruct

Qwen-Qwen2-VL-72B-Instruct

From $1.20/M tokens](https://modelslab.com/models/qwen/Qwen-Qwen2-VL-72B-Instruct)

[#### Upstage/Upstage: Solar Mini 4

upstage-solar-mini4

From $0.13/M tokens](https://modelslab.com/models/upstage/upstage-solar-mini4)

[#### NVIDIA/NVIDIA: Switchyard

nvidia-switchyard

Free](https://modelslab.com/models/nvidia/nvidia-switchyard)

[#### Google/Google: Gemini 3.6 Flash

google-gemini-3.6-flash

From $2.25/M tokens](https://modelslab.com/models/google/google-gemini-3.6-flash)

[#### Relace/Relace: Relace Search

relace-relace-search

From $2.00/M tokens](https://modelslab.com/models/relace/relace-relace-search)

[#### DeepSeek/DeepSeek: DeepSeek V4 Flash 0731

deepseek-deepseek-v4-flash-0731

From $0.17/M tokens](https://modelslab.com/models/deepseek/deepseek-deepseek-v4-flash-0731)

[#### Cohere/Cohere: Command R (08-2024)

cohere-command-r-08-2024

From $0.38/M tokens](https://modelslab.com/models/cohere/cohere-command-r-08-2024)

About SpaceXAI: Grok 4.7 (Batch)
---

Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, verifying its own work, and...

### Technical Specifications

Model IDx-ai-grok-4.7-batch

CategoryLLM Models

TaskText Generation

Price$3.2 per million tokens

AddedNovember 3, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate SpaceXAI: Grok 4.7 (Batch) into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "x-ai-grok-4.7-batch",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

### Pricing

SpaceXAI: Grok 4.7 (Batch) API costs $3.2 per million tokens. Plans start at $21/month, and open-source models are unlimited on the $149/month plan. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from xAI](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

SpaceXAI: Grok 4.7 (Batch) FAQ
---

### What is SpaceXAI: Grok 4.7 (Batch)?

Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, verifying its own work, and...

### How do I use the SpaceXAI: Grok 4.7 (Batch) API?

You can integrate SpaceXAI: Grok 4.7 (Batch) into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "x-ai-grok-4.7-batch" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does SpaceXAI: Grok 4.7 (Batch) cost?

SpaceXAI: Grok 4.7 (Batch) costs $3.2 per million tokens. ModelsLab plans start at $21/month (Basic), and the $149/month Open Source plan includes unlimited generation on open-source models.

### What is the SpaceXAI: Grok 4.7 (Batch) model ID?

The model ID for SpaceXAI: Grok 4.7 (Batch) is "x-ai-grok-4.7-batch". Use this ID in your API requests to specify this model.

### Do I need a paid plan to use SpaceXAI: Grok 4.7 (Batch)?

Yes. ModelsLab is subscription-based with no free tier — plans start at $21/month (Basic, 3,250 API calls). The $149/month Open Source Unlimited plan includes unlimited generation across open-source models; premium third-party models are billed per call from your wallet.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-11-10*