{ "model_id": "xai/grok-4.20-0309-non-reasoning", "provider_id": "xai", "name": "Grok 4.20 Non-Reasoning", "description": "xAI's Grok 4.20 non-reasoning model. Skips the thinking trace for fast, single-pass responses while keeping the same training as the reasoning variant.", "task": "Text Generation", "tags": [ "LLM", "Coding", "Writing" ], "context_length": 2000000, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Input tokens (per 1M)": 2, "Output tokens (per 1M)": 6, "Cached input tokens (per 1M)": 0.2 }, "examples": [ { "name": "Simple Question", "description": "Basic chat completion request", "input": { "messages": [ { "content": "What are the three laws of thermodynamics?", "role": "user" } ] }, "output": { "text": "**The Three Laws of Thermodynamics** (in their most common, concise form):\n\n### **Zeroth Law of Thermodynamics** (often called the \"zeroth\" because it logically precedes the others)\n> If two systems are each in thermal equilibrium with a third system, then they are in thermal equilibrium with each other.\n\nThis is the basis for the concept of **temperature** \u2014 it allows us to define a universal temperature scale.\n\n### **First Law of Thermodynamics**\n> Energy cannot be created or destroyed, only converted from one form to another.\n\nMathematically: \n**\u0394U = Q \u2212 W** \n(where \u0394U is the change in internal energy, Q is heat added to the system, and W is work done *by* the system)\n\nThis is essentially the **law of conservation of energy** applied to thermodynamic systems.\n\n### **Second Law of Thermodynamics**\n> The entropy of an isolated system always increases over time, or remains constant in ideal reversible processes. Heat flows spontaneously from hot to cold, never the reverse.\n\nCommon statements:\n- \"The entropy of the universe tends to a maximum.\"\n- \"It is impossible to construct a heat engine that is 100% efficient.\"\n\nThis law introduces the concept of **irreversibility** and the **arrow of time**.\n\n---\n\n### Bonus: The **Third Law of Thermodynamics** (Nernst Heat Theorem)\n> As the temperature of a system approaches absolute zero (0 K), the entropy of a perfect crystal approaches a minimum (usually zero).\n\nThis implies it's impossible to reach absolute zero in a finite number of steps.\n\n---\n\n**Summary (popular phrasing):**\n1. **Zeroth**: Temperature exists.\n2. **First**: You can't win (energy is conserved).\n3. **Second**: You can't break even (entropy always increases).\n4. **Third**: You can't even quit the game (absolute zero is unreachable)." }, "raw_response": { "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "**The Three Laws of Thermodynamics** (in their most common, concise form):\n\n### **Zeroth Law of Thermodynamics** (often called the \"zeroth\" because it logically precedes the others)\n> If two systems are each in thermal equilibrium with a third system, then they are in thermal equilibrium with each other.\n\nThis is the basis for the concept of **temperature** \u2014 it allows us to define a universal temperature scale.\n\n### **First Law of Thermodynamics**\n> Energy cannot be created or destroyed, only converted from one form to another.\n\nMathematically: \n**\u0394U = Q \u2212 W** \n(where \u0394U is the change in internal energy, Q is heat added to the system, and W is work done *by* the system)\n\nThis is essentially the **law of conservation of energy** applied to thermodynamic systems.\n\n### **Second Law of Thermodynamics**\n> The entropy of an isolated system always increases over time, or remains constant in ideal reversible processes. Heat flows spontaneously from hot to cold, never the reverse.\n\nCommon statements:\n- \"The entropy of the universe tends to a maximum.\"\n- \"It is impossible to construct a heat engine that is 100% efficient.\"\n\nThis law introduces the concept of **irreversibility** and the **arrow of time**.\n\n---\n\n### Bonus: The **Third Law of Thermodynamics** (Nernst Heat Theorem)\n> As the temperature of a system approaches absolute zero (0 K), the entropy of a perfect crystal approaches a minimum (usually zero).\n\nThis implies it's impossible to reach absolute zero in a finite number of steps.\n\n---\n\n**Summary (popular phrasing):**\n1. **Zeroth**: Temperature exists.\n2. **First**: You can't win (energy is conserved).\n3. **Second**: You can't break even (entropy always increases).\n4. **Third**: You can't even quit the game (absolute zero is unreachable).", "refusal": null, "role": "assistant" } } ], "created": 1777675694, "gatewayMetadata": { "keySource": "Unified" }, "id": "ad22f976-34a4-e1f2-5d44-2c6b9c2fb9e5", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion", "system_fingerprint": "fp_bdeb03b7cd", "usage": { "completion_tokens": 378, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "cost_in_usd_ticks": 10403000, "num_sources_used": 0, "prompt_tokens": 130, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 64, "image_tokens": 0, "text_tokens": 130 }, "total_tokens": 508 } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'xai/grok-4.20-0309-non-reasoning',\n { messages: [{ content: 'What are the three laws of thermodynamics?', role: 'user' }] },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"xai/grok-4.20-0309-non-reasoning\",\n \"messages\": [\n {\n \"content\": \"What are the three laws of thermodynamics?\",\n \"role\": \"user\"\n }\n ]\n}'" } ] }, { "name": "With System Message", "description": "Using a system message to set context", "input": { "messages": [ { "content": "You are a helpful coding assistant specializing in Python.", "role": "system" }, { "content": "How do I read a JSON file in Python?", "role": "user" } ] }, "output": { "text": "**Reading a JSON file in Python** is very straightforward using the built-in `json` module.\n\n### 1. Basic Method (Recommended)\n\n```python\nimport json\nfrom pathlib import Path\n\n# Method 1: Using pathlib (modern and clean)\ndef read_json_file(file_path):\n with open(file_path, 'r', encoding='utf-8') as file:\n data = json.load(file)\n return data\n\n# Usage\ndata = read_json_file('data.json')\nprint(data)\n```\n\n### 2. Most Common Patterns\n\n```python\nimport json\n\n# Option 1: Using pathlib (Recommended)\ndata = json.loads(Path('data.json').read_text(encoding='utf-8'))\n\n# Option 2: Traditional way\nwith open('data.json', 'r', encoding='utf-8') as f:\n data = json.load(f)\n\n# Option 3: One-liner\ndata = json.load(open('data.json', encoding='utf-8'))\n```\n\n### 3. Complete Example with Error Handling\n\n```python\nimport json\nfrom pathlib import Path\nfrom typing import Any\n\ndef read_json(file_path: str | Path) -> Any:\n \"\"\"Safely read a JSON file with proper error handling.\"\"\"\n try:\n path = Path(file_path)\n with open(path, 'r', encoding='utf-8') as file:\n return json.load(file)\n \n except FileNotFoundError:\n print(f\"Error: File '{file_path}' not found.\")\n return None\n except json.JSONDecodeError as e:\n print(f\"Error: Invalid JSON in '{file_path}': {e}\")\n return None\n except Exception as e:\n print(f\"Unexpected error reading '{file_path}': {e}\")\n return None\n\n\n# Usage examples:\ndata = read_json('config.json')\ndata = read_json(Path('data/settings.json'))\n\n# Access the data\nif data:\n print(data.get('name'))\n print(data['users'][0]['email'])\n```\n\n### Key Points:\n\n- Use `json.load()` when reading from a **file object**\n- Use `json.loads()` when reading from a **string**\n- Always specify `encoding='utf-8'` (best practice)\n- Use `pathlib.Path` for modern Python code\n- Always handle potential `JSONDecodeError` and `FileNotFoundError`\n\nWould you like to see how to also **write** JSON files or work with specific JSON structures (like configurations, lists of objects, etc.)?" }, "raw_response": { "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "**Reading a JSON file in Python** is very straightforward using the built-in `json` module.\n\n### 1. Basic Method (Recommended)\n\n```python\nimport json\nfrom pathlib import Path\n\n# Method 1: Using pathlib (modern and clean)\ndef read_json_file(file_path):\n with open(file_path, 'r', encoding='utf-8') as file:\n data = json.load(file)\n return data\n\n# Usage\ndata = read_json_file('data.json')\nprint(data)\n```\n\n### 2. Most Common Patterns\n\n```python\nimport json\n\n# Option 1: Using pathlib (Recommended)\ndata = json.loads(Path('data.json').read_text(encoding='utf-8'))\n\n# Option 2: Traditional way\nwith open('data.json', 'r', encoding='utf-8') as f:\n data = json.load(f)\n\n# Option 3: One-liner\ndata = json.load(open('data.json', encoding='utf-8'))\n```\n\n### 3. Complete Example with Error Handling\n\n```python\nimport json\nfrom pathlib import Path\nfrom typing import Any\n\ndef read_json(file_path: str | Path) -> Any:\n \"\"\"Safely read a JSON file with proper error handling.\"\"\"\n try:\n path = Path(file_path)\n with open(path, 'r', encoding='utf-8') as file:\n return json.load(file)\n \n except FileNotFoundError:\n print(f\"Error: File '{file_path}' not found.\")\n return None\n except json.JSONDecodeError as e:\n print(f\"Error: Invalid JSON in '{file_path}': {e}\")\n return None\n except Exception as e:\n print(f\"Unexpected error reading '{file_path}': {e}\")\n return None\n\n\n# Usage examples:\ndata = read_json('config.json')\ndata = read_json(Path('data/settings.json'))\n\n# Access the data\nif data:\n print(data.get('name'))\n print(data['users'][0]['email'])\n```\n\n### Key Points:\n\n- Use `json.load()` when reading from a **file object**\n- Use `json.loads()` when reading from a **string**\n- Always specify `encoding='utf-8'` (best practice)\n- Use `pathlib.Path` for modern Python code\n- Always handle potential `JSONDecodeError` and `FileNotFoundError`\n\nWould you like to see how to also **write** JSON files or work with specific JSON structures (like configurations, lists of objects, etc.)?", "refusal": null, "role": "assistant" } } ], "created": 1777675694, "gatewayMetadata": { "keySource": "Unified" }, "id": "90c95869-a6c3-9a03-95d1-32f6a41a14ca", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion", "system_fingerprint": "fp_bdeb03b7cd", "usage": { "completion_tokens": 521, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "cost_in_usd_ticks": 14165500, "num_sources_used": 0, "prompt_tokens": 145, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 64, "image_tokens": 0, "text_tokens": 145 }, "total_tokens": 666 } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'xai/grok-4.20-0309-non-reasoning',\n {\n messages: [\n { content: 'You are a helpful coding assistant specializing in Python.', role: 'system' },\n { content: 'How do I read a JSON file in Python?', role: 'user' },\n ],\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"xai/grok-4.20-0309-non-reasoning\",\n \"messages\": [\n {\n \"content\": \"You are a helpful coding assistant specializing in Python.\",\n \"role\": \"system\"\n },\n {\n \"content\": \"How do I read a JSON file in Python?\",\n \"role\": \"user\"\n }\n ]\n}'" } ] }, { "name": "Multi-turn Conversation", "description": "Continuing a conversation with context", "input": { "max_completion_tokens": 8192, "messages": [ { "content": "I need help planning a road trip from San Francisco to Los Angeles.", "role": "user" }, { "content": "I'd be happy to help! The drive is about 380 miles and takes roughly 5-6 hours. Would you like suggestions for scenic routes or interesting stops along the way?", "role": "assistant" }, { "content": "Yes, what are some good places to stop?", "role": "user" } ] }, "output": { "text": "Here are some excellent stops along (or just off) the main routes from San Francisco to Los Angeles. I\u2019ve grouped them roughly in north-to-south order so you can slot them into your itinerary easily.\n\n### Classic Coastal Route (Highway 1 / Pacific Coast Highway)\nThis is the most scenic option and the one most people picture when they say \u201croad trip from SF to LA.\u201d\n\n1. **Half Moon Bay** (\u2248 30 min south of SF) \n - Cute coastal town with beaches, tide pools, and the famous \u201cPumpkin Festival\u201d in October. Great for a quick coffee or beach walk.\n\n2. **Pescadero & A\u00f1o Nuevo State Park** (\u2248 1 hr from SF) \n - Stop at **Duarte\u2019s Tavern** for artichoke soup and pie. A\u00f1o Nuevo has elephant seals (best Dec\u2013March).\n\n3. **Santa Cruz** (\u2248 1.5 hrs from SF) \n - Beach Boardwalk, redwood hikes in Henry Cowell Redwoods, or the famous surf at Pleasure Point. Good food scene.\n\n4. **Monterey & Pacific Grove** (\u2248 2 hrs from SF) \n - Cannery Row, Monterey Bay Aquarium (book ahead), 17-Mile Drive, and the monarch butterfly sanctuary in Pacific Grove (Oct\u2013Feb).\n\n5. **Big Sur** (\u2248 3\u20134 hrs from SF \u2013 the heart of the drive) \n - **Bixby Bridge** photo stop \n - **Point Sur Lighthouse** (tours available) \n - **Julia Pfeiffer Burns State Park** \u2013 McWay Falls (waterfall onto the beach) \n - **Pfeiffer Beach** \u2013 purple sand and keyhole rock \n - **Nepenthe** or **Big Sur Bakery** for lunch with a view \n - **Ventana Big Sur** or **Post Ranch Inn** if you want an upscale overnight.\n\n6. **Cambria / Hearst Castle** (\u2248 5\u20136 hrs from SF) \n - Tour the famous Hearst Castle (reservations required). \n - Moonstone Beach boardwalk for sunset.\n\n7. **San Luis Obispo (SLO)** (\u2248 6.5 hrs from SF) \n - Bubblegum Alley, great farm-to-table food, and a lively downtown.\n\n8. **Pismo Beach** \n - Classic California beach town with sand dunes you can drive on (ATV tours available).\n\n9. **Solvang** (short detour) \n - Danish-themed village with windmills, bakeries, and \u00c6bleskiver pancakes. Fun for 1\u20132 hours.\n\n10. **Santa Barbara** (\u2248 8\u20139 hrs from SF if you linger) \n - \u201cAmerican Riviera.\u201d State Street for shopping, Mission Santa Barbara, beaches, and wine tasting in the Funk Zone.\n\n11. **Malibu** (final stretch before LA) \n - Point Dume, El Matador Beach, or a sunset dinner at Malibu Pier.\n\n### Inland / Faster Route Highlights (I-5 corridor)\nIf you\u2019re short on time but still want stops:\n\n- **Gilroy** \u2013 \u201cGarlic Capital of the World\u201d (garlic ice cream if you\u2019re brave).\n- **Pacheco Pass** \u2192 **San Luis Reservoir** for dramatic views.\n- **Harris Ranch** \u2013 iconic Central Valley steakhouse stop.\n- **Bakersfield** \u2013 for Basque food or country-music vibes.\n- **Tejon Pass / Magic Mountain** \u2013 quick amusement-park option.\n\n### Suggested Itineraries\n\n**Scenic 2-Day Trip (most popular)** \nDay 1: SF \u2192 Big Sur (overnight in Big Sur or Cambria) \nDay 2: Big Sur \u2192 Santa Barbara \u2192 LA\n\n**3-Day Leisure Trip** \nDay 1: SF \u2192 Monterey / Carmel (overnight) \nDay 2: Monterey \u2192 Cambria / Hearst Castle \u2192 SLO (overnight) \nDay 3: SLO \u2192 Santa Barbara \u2192 Malibu \u2192 LA\n\nWould you like me to:\n- Build a day-by-day itinerary with driving times and restaurant recommendations?\n- Focus on specific interests (hiking, food, photography, wine, budget, luxury, etc.)?\n- Include where to stay or current road conditions / permit info for Big Sur?\n\nJust let me know your preferences (how many days, budget level, must-see activities, etc.) and I\u2019ll tailor it further!" }, "raw_response": { "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "Here are some excellent stops along (or just off) the main routes from San Francisco to Los Angeles. I\u2019ve grouped them roughly in north-to-south order so you can slot them into your itinerary easily.\n\n### Classic Coastal Route (Highway 1 / Pacific Coast Highway)\nThis is the most scenic option and the one most people picture when they say \u201croad trip from SF to LA.\u201d\n\n1. **Half Moon Bay** (\u2248 30 min south of SF) \n - Cute coastal town with beaches, tide pools, and the famous \u201cPumpkin Festival\u201d in October. Great for a quick coffee or beach walk.\n\n2. **Pescadero & A\u00f1o Nuevo State Park** (\u2248 1 hr from SF) \n - Stop at **Duarte\u2019s Tavern** for artichoke soup and pie. A\u00f1o Nuevo has elephant seals (best Dec\u2013March).\n\n3. **Santa Cruz** (\u2248 1.5 hrs from SF) \n - Beach Boardwalk, redwood hikes in Henry Cowell Redwoods, or the famous surf at Pleasure Point. Good food scene.\n\n4. **Monterey & Pacific Grove** (\u2248 2 hrs from SF) \n - Cannery Row, Monterey Bay Aquarium (book ahead), 17-Mile Drive, and the monarch butterfly sanctuary in Pacific Grove (Oct\u2013Feb).\n\n5. **Big Sur** (\u2248 3\u20134 hrs from SF \u2013 the heart of the drive) \n - **Bixby Bridge** photo stop \n - **Point Sur Lighthouse** (tours available) \n - **Julia Pfeiffer Burns State Park** \u2013 McWay Falls (waterfall onto the beach) \n - **Pfeiffer Beach** \u2013 purple sand and keyhole rock \n - **Nepenthe** or **Big Sur Bakery** for lunch with a view \n - **Ventana Big Sur** or **Post Ranch Inn** if you want an upscale overnight.\n\n6. **Cambria / Hearst Castle** (\u2248 5\u20136 hrs from SF) \n - Tour the famous Hearst Castle (reservations required). \n - Moonstone Beach boardwalk for sunset.\n\n7. **San Luis Obispo (SLO)** (\u2248 6.5 hrs from SF) \n - Bubblegum Alley, great farm-to-table food, and a lively downtown.\n\n8. **Pismo Beach** \n - Classic California beach town with sand dunes you can drive on (ATV tours available).\n\n9. **Solvang** (short detour) \n - Danish-themed village with windmills, bakeries, and \u00c6bleskiver pancakes. Fun for 1\u20132 hours.\n\n10. **Santa Barbara** (\u2248 8\u20139 hrs from SF if you linger) \n - \u201cAmerican Riviera.\u201d State Street for shopping, Mission Santa Barbara, beaches, and wine tasting in the Funk Zone.\n\n11. **Malibu** (final stretch before LA) \n - Point Dume, El Matador Beach, or a sunset dinner at Malibu Pier.\n\n### Inland / Faster Route Highlights (I-5 corridor)\nIf you\u2019re short on time but still want stops:\n\n- **Gilroy** \u2013 \u201cGarlic Capital of the World\u201d (garlic ice cream if you\u2019re brave).\n- **Pacheco Pass** \u2192 **San Luis Reservoir** for dramatic views.\n- **Harris Ranch** \u2013 iconic Central Valley steakhouse stop.\n- **Bakersfield** \u2013 for Basque food or country-music vibes.\n- **Tejon Pass / Magic Mountain** \u2013 quick amusement-park option.\n\n### Suggested Itineraries\n\n**Scenic 2-Day Trip (most popular)** \nDay 1: SF \u2192 Big Sur (overnight in Big Sur or Cambria) \nDay 2: Big Sur \u2192 Santa Barbara \u2192 LA\n\n**3-Day Leisure Trip** \nDay 1: SF \u2192 Monterey / Carmel (overnight) \nDay 2: Monterey \u2192 Cambria / Hearst Castle \u2192 SLO (overnight) \nDay 3: SLO \u2192 Santa Barbara \u2192 Malibu \u2192 LA\n\nWould you like me to:\n- Build a day-by-day itinerary with driving times and restaurant recommendations?\n- Focus on specific interests (hiking, food, photography, wine, budget, luxury, etc.)?\n- Include where to stay or current road conditions / permit info for Big Sur?\n\nJust let me know your preferences (how many days, budget level, must-see activities, etc.) and I\u2019ll tailor it further!", "refusal": null, "role": "assistant" } } ], "created": 1777675700, "gatewayMetadata": { "keySource": "Unified" }, "id": "4eb7a1aa-c8a6-9b80-96e0-b49fe3efbb1d", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion", "system_fingerprint": "fp_bdeb03b7cd", "usage": { "completion_tokens": 915, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "cost_in_usd_ticks": 24578000, "num_sources_used": 0, "prompt_tokens": 190, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 64, "image_tokens": 0, "text_tokens": 190 }, "total_tokens": 1105 } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'xai/grok-4.20-0309-non-reasoning',\n {\n max_completion_tokens: 8192,\n messages: [\n {\n content: 'I need help planning a road trip from San Francisco to Los Angeles.',\n role: 'user',\n },\n {\n content:\n \"I'd be happy to help! The drive is about 380 miles and takes roughly 5-6 hours. Would you like suggestions for scenic routes or interesting stops along the way?\",\n role: 'assistant',\n },\n { content: 'Yes, what are some good places to stop?', role: 'user' },\n ],\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"xai/grok-4.20-0309-non-reasoning\",\n \"max_completion_tokens\": 8192,\n \"messages\": [\n {\n \"content\": \"I need help planning a road trip from San Francisco to Los Angeles.\",\n \"role\": \"user\"\n },\n {\n \"content\": \"I'\\''d be happy to help! The drive is about 380 miles and takes roughly 5-6 hours. Would you like suggestions for scenic routes or interesting stops along the way?\",\n \"role\": \"assistant\"\n },\n {\n \"content\": \"Yes, what are some good places to stop?\",\n \"role\": \"user\"\n }\n ]\n}'" } ] }, { "name": "Creative Writing", "description": "Longer completion for creative output", "input": { "max_completion_tokens": 8192, "messages": [ { "content": "Write a short story opening about a detective finding an unusual clue.", "role": "user" } ] }, "output": { "text": "The rain-slicked alley behind the old theater smelled of rotting velvet and gunpowder. Detective Elias Crowe knelt beside the body, his flashlight beam cutting through the downpour, and paused.\n\nThere, clutched in the dead man\u2019s rigid fingers, was a single playing card: the Queen of Hearts. That wasn\u2019t unusual in itself. What stopped Crowe cold was that the card was warm, almost hot, as though it had just come off a printing press. And when he turned it over, the back wasn\u2019t patterned with the usual bicycles or fleurs-de-lis.\n\nIt was a tiny, perfectly detailed photograph of the crime scene itself, taken from an angle that should have been impossible\u2014directly above the body, as if the card had been watching the murder happen." }, "raw_response": { "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "The rain-slicked alley behind the old theater smelled of rotting velvet and gunpowder. Detective Elias Crowe knelt beside the body, his flashlight beam cutting through the downpour, and paused.\n\nThere, clutched in the dead man\u2019s rigid fingers, was a single playing card: the Queen of Hearts. That wasn\u2019t unusual in itself. What stopped Crowe cold was that the card was warm, almost hot, as though it had just come off a printing press. And when he turned it over, the back wasn\u2019t patterned with the usual bicycles or fleurs-de-lis.\n\nIt was a tiny, perfectly detailed photograph of the crime scene itself, taken from an angle that should have been impossible\u2014directly above the body, as if the card had been watching the murder happen.", "refusal": null, "role": "assistant" } } ], "created": 1777675700, "gatewayMetadata": { "keySource": "Unified" }, "id": "ffb95915-83b7-ac06-34d9-f031b0056ab1", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion", "system_fingerprint": "fp_bdeb03b7cd", "usage": { "completion_tokens": 154, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "cost_in_usd_ticks": 4865500, "num_sources_used": 0, "prompt_tokens": 135, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 64, "image_tokens": 0, "text_tokens": 135 }, "total_tokens": 289 } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'xai/grok-4.20-0309-non-reasoning',\n {\n max_completion_tokens: 8192,\n messages: [\n {\n content: 'Write a short story opening about a detective finding an unusual clue.',\n role: 'user',\n },\n ],\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"xai/grok-4.20-0309-non-reasoning\",\n \"max_completion_tokens\": 8192,\n \"messages\": [\n {\n \"content\": \"Write a short story opening about a detective finding an unusual clue.\",\n \"role\": \"user\"\n }\n ]\n}'" } ] }, { "name": "Streaming Response", "description": "Enable streaming for real-time output", "input": { "messages": [ { "content": "Explain the concept of recursion with a simple example.", "role": "user" } ], "stream": true, "stream_options": { "include_usage": true } }, "output": { "text": [ "**", "Recursion", "**", " is", " a", " programming", " concept", " where", " a", " function", " **", "calls", " itself", "**", " to", " solve", " a", " smaller", " version", " of", " the", " same", " problem", ".\n\n", "It's", " like", " solving", " a", " big", " problem", " by", " repeatedly", " breaking", " it", " down", " into", " smaller", ",", " identical", " problems", " until", " you", " reach", " a", " simple", " case", " that", " can", " be", " solved", " directly", ".\n\n", "---\n\n", "###", " Simple", " Example", ":", " Factor", "ial", "\n\n", "The", " **", "factor", "ial", "**", " of", " a", " number", " `", "n", "`", " (", "written", " as", " `", "n", "!", "`)", " is", ":\n", "-", " `", "5", "!", " =", " ", "5", " \u00d7", " ", "4", " \u00d7", " ", "3", " \u00d7", " ", "2", " \u00d7", " ", "1", " =", " ", "120", "`\n\n", "We", " can", " define", " factorial", " recursively", ":\n\n", "###", " Recursive", " Definition", ":\n", "-", " `", "factor", "ial", "(n", ")", " =", " n", " \u00d7", " factorial", "(n", "-", "1", ")`", " ", " \u2190", " recursive", " case", "\n", "-", " `", "factor", "ial", "(", "0", ")", " =", " ", "1", "`", " ", " \u2190", " **", "base", " case", "**", " (", "stops", " the", " recursion", ")\n\n", "---\n\n", "###", " Code", " Example", " (", "Python", "):\n\n", "```", "python", "\n", "def", " factorial", "(n", "):\n", " ", " #", " Base", " case", ":", " stop", " recursion", "\n", " ", " if", " n", " ==", " ", "0", " or", " n", " ==", " ", "1", ":\n", " ", " return", " ", "1", "\n", " ", " #", " Recursive", " case", ":", " call", " itself", " with", " a", " smaller", " number", "\n", " ", " else", ":\n", " ", " return", " n", " *", " factorial", "(n", " -", " ", "1", ")\n\n\n", "#", " Test", " it", "\n", "print", "(f", "actorial", "(", "5", "))", " ", " #", " Output", ":", " ", "120", "\n", "```\n\n", "---\n\n", "###", " How", " it", " works", " step", " by", " step", ":\n\n", "When", " you", " call", " `", "factor", "ial", "(", "5", ")`", ":\n\n", "```\n", "factor", "ial", "(", "5", ")", " =", " ", "5", " \u00d7", " factorial", "(", "4", ")\n", " ", " =", " ", "5", " \u00d7", " (", "4", " \u00d7", " factorial", "(", "3", "))\n", " ", " =", " ", "5", " \u00d7", " (", "4", " \u00d7", " (", "3", " \u00d7", " factorial", "(", "2", ")))\n", " ", " =", " ", "5", " \u00d7", " (", "4", " \u00d7", " (", "3", " \u00d7", " (", "2", " \u00d7", " factorial", "(", "1", "))))\n", " ", " =", " ", "5", " \u00d7", " (", "4", " \u00d7", " (", "3", " \u00d7", " (", "2", " \u00d7", " ", "1", ")))", " ", " \u2190", " base", " case", " reached", "\n", " ", " =", " ", "120", "\n", "```\n\n", "Each", " recursive", " call", " creates", " a", " new", " \"", "layer", "\"", " until", " it", " hits", " the", " base", " case", ",", " then", " it", " starts", " returning", " values", " back", " up", " the", " chain", ".\n\n", "---\n\n", "###", " Key", " Parts", " of", " Rec", "ursion", ":\n", "1", ".", " **", "Base", " Case", "**", " \u2013", " The", " simplest", " case", " that", " can", " be", " solved", " directly", " (", "stops", " infinite", " recursion", ").\n", "2", ".", " **", "Recursive", " Case", "**", " \u2013", " The", " function", " calls", " itself", " with", " a", " simpler", "/small", "er", " input", ".\n\n", "---\n\n", "Would", " you", " like", " me", " to", " also", " show", " a", " visual", " example", " using", " a", " stack", " or", " another", " common", " recursive", " example", " like", " counting", " down", " or", " summing", " numbers", "?" ] }, "raw_response": [ { "choices": [ { "delta": { "content": "**", "role": "assistant" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "Recursion" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "**" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " is" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " programming" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " concept" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " where" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " function" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " **" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "calls" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " itself" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "**" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " to" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " solve" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " smaller" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " version" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " of" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " the" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " same" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " problem" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ".\n\n" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "It's" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " like" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " solving" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " big" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " problem" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " by" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " repeatedly" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " breaking" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " it" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " down" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " into" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " smaller" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "," }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " identical" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " problems" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " until" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " you" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " reach" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " simple" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " that" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " can" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " be" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " solved" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " directly" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ".\n\n" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "---\n\n" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "###" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Simple" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Example" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Factor" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ial" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n\n" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "The" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " **" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "factor" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ial" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "**" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " of" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " number" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " `" }, "index": 0 } ], "created": 1777679681, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "`" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "written" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " as" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " `" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "!" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "`)" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " is" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "-" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " `" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "!" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "4" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "3" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "2" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "120" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "`\n\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "We" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " can" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " define" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursively" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "###" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Recursive" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Definition" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "-" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " `" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "factor" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ial" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "-" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")`" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u2190" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursive" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "-" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " `" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "factor" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ial" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "0" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "`" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u2190" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " **" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "base" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "**" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "stops" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " the" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursion" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")\n\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "---\n\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "###" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Code" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Example" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "Python" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "):\n\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "```" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "python" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "def" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "):\n" }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679682, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " #" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Base" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " stop" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursion" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " if" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " ==" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "0" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " or" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " ==" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " return" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " #" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Recursive" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " call" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " itself" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " with" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " smaller" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " number" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " else" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " return" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " *" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " -" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")\n\n\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "#" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Test" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " it" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "print" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(f" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "actorial" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "))" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " #" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Output" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "120" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "```\n\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "---\n\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "###" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " How" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " it" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " works" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " step" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " by" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " step" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "When" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " you" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " call" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " `" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "factor" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ial" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")`" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "```\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "factor" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ial" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "4" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "4" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "3" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "))\n" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679683, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "4" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "3" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "2" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")))\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "4" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "3" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "2" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " factorial" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "(" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "))))\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "5" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "4" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "3" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "2" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u00d7" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ")))" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u2190" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " base" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " reached" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " =" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " " }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "120" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "```\n\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "Each" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursive" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " call" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " creates" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " new" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \"" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "layer" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "\"" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " until" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " it" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " hits" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " the" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " base" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "," }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " then" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " it" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " starts" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " returning" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " values" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " back" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " up" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " the" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " chain" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ".\n\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "---\n\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "###" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Key" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Parts" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " of" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Rec" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "ursion" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ":\n" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "1" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "." }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " **" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "Base" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Case" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "**" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u2013" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " The" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " simplest" }, "index": 0 } ], "created": 1777679684, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " case" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " that" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " can" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " be" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " solved" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " directly" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " (" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "stops" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " infinite" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursion" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ").\n" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "2" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "." }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " **" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "Recursive" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " Case" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "**" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " \u2013" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " The" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " function" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " calls" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " itself" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " with" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " simpler" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "/small" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "er" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " input" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": ".\n\n" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "---\n\n" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "Would" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " you" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " like" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " me" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " to" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " also" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " show" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " visual" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " example" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " using" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " a" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " stack" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " or" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " another" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " common" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " recursive" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " example" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " like" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " counting" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " down" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " or" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " summing" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": " numbers" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": { "content": "?" }, "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [ { "delta": {}, "finish_reason": "stop", "index": 0 } ], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd" }, { "choices": [], "created": 1777679685, "id": "f987889c-ee9b-97a6-9c83-c687c444bbfb", "model": "grok-4.20-0309-non-reasoning", "object": "chat.completion.chunk", "system_fingerprint": "fp_bdeb03b7cd", "usage": { "completion_tokens": 441, "completion_tokens_details": { "accepted_prediction_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0, "rejected_prediction_tokens": 0 }, "cost_in_usd_ticks": 12003000, "num_sources_used": 0, "prompt_tokens": 132, "prompt_tokens_details": { "audio_tokens": 0, "cached_tokens": 64, "image_tokens": 0, "text_tokens": 132 }, "total_tokens": 573 } } ], "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'xai/grok-4.20-0309-non-reasoning',\n {\n messages: [{ content: 'Explain the concept of recursion with a simple example.', role: 'user' }],\n stream: true,\n stream_options: { include_usage: true },\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/chat/completions \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"xai/grok-4.20-0309-non-reasoning\",\n \"messages\": [\n {\n \"content\": \"Explain the concept of recursion with a simple example.\",\n \"role\": \"user\"\n }\n ],\n \"stream\": true,\n \"stream_options\": {\n \"include_usage\": true\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": true, "zdr_comment": null, "external_info": "https://x.ai/", "terms": "https://x.ai/legal/terms-of-service", "cover_image_url": "https://pub-26f1392c1b674324be6786695bd72257.r2.dev/xai/grok-4.20-0309-non-reasoning.png", "metadata": { "Architecture": "Transformer", "Reasoning": "No", "fedrampAvailable": "true" }, "request_formats": [ "chat-completions" ], "providers": null, "provider_details": [ { "id": "xai", "pricing": { "input_tokens": 2, "output_tokens": 6, "input_cached_tokens": 0.2 } } ], "banner": null, "created_at": "2026-05-22 17:54:01", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "messages": { "minItems": 1, "maxItems": 500, "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "role": { "type": "string", "const": "system" }, "content": { "type": "string" }, "name": { "type": "string" } }, "required": [ "role", "content" ], "additionalProperties": false }, { "type": "object", "properties": { "role": { "type": "string", "const": "user" }, "content": { "anyOf": [ { "type": "string" }, { "minItems": 1, "maxItems": 20, "type": "array", "items": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "text" }, "text": { "type": "string" } }, "required": [ "type", "text" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "image_url" }, "image_url": { "type": "object", "properties": { "url": { "type": "string" }, "detail": { "type": "string", "enum": [ "auto", "low", "high" ] } }, "required": [ "url" ], "additionalProperties": false } }, "required": [ "type", "image_url" ], "additionalProperties": false } ] } } ] }, "name": { "type": "string" } }, "required": [ "role", "content" ], "additionalProperties": false }, { "type": "object", "properties": { "role": { "type": "string", "const": "assistant" }, "content": { "type": [ "string", "null" ] }, "tool_calls": { "maxItems": 128, "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "const": "function" }, "function": { "type": "object", "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ], "additionalProperties": false } }, "required": [ "id", "type", "function" ], "additionalProperties": false } }, "name": { "type": "string" } }, "required": [ "role" ], "additionalProperties": false }, { "type": "object", "properties": { "role": { "type": "string", "const": "tool" }, "content": { "type": "string" }, "tool_call_id": { "type": "string" } }, "required": [ "role", "content", "tool_call_id" ], "additionalProperties": false } ] } }, "deferred": { "type": [ "boolean", "null" ] }, "frequency_penalty": { "anyOf": [ { "type": "number", "minimum": -2, "maximum": 2 }, { "type": "null" } ] }, "logprobs": { "type": [ "boolean", "null" ] }, "max_completion_tokens": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "max_tokens": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "n": { "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 10 }, { "type": "null" } ] }, "parallel_tool_calls": { "type": [ "boolean", "null" ] }, "presence_penalty": { "anyOf": [ { "type": "number", "minimum": -2, "maximum": 2 }, { "type": "null" } ] }, "reasoning_effort": { "anyOf": [ { "type": "string", "enum": [ "low", "high" ] }, { "type": "null" } ] }, "response_format": { "anyOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "text" } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "json_object" } }, "required": [ "type" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "json_schema" }, "json_schema": { "type": "object", "properties": { "name": { "type": "string" }, "schema": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "strict": { "type": "boolean" } }, "required": [ "name", "schema" ], "additionalProperties": false } }, "required": [ "type", "json_schema" ], "additionalProperties": false } ] }, "search_parameters": { "type": "object", "properties": { "from_date": { "type": [ "string", "null" ] }, "max_search_results": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "mode": { "anyOf": [ { "type": "string", "enum": [ "off", "on", "auto" ] }, { "type": "null" } ] }, "return_citations": { "type": [ "boolean", "null" ] }, "sources": { "anyOf": [ { "maxItems": 20, "type": "array", "items": {} }, { "type": "null" } ] }, "to_date": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "seed": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "stop": { "anyOf": [ { "maxItems": 4, "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "stream": { "type": [ "boolean", "null" ] }, "stream_options": { "type": "object", "properties": { "include_usage": { "type": "boolean" } }, "required": [ "include_usage" ], "additionalProperties": false }, "temperature": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 2 }, { "type": "null" } ] }, "tool_choice": { "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "function" }, "function": { "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ], "additionalProperties": false } }, "required": [ "type", "function" ], "additionalProperties": false } ] }, "tools": { "anyOf": [ { "maxItems": 128, "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "const": "function" }, "function": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" }, "parameters": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "strict": { "type": "boolean" } }, "required": [ "name", "parameters" ], "additionalProperties": false } }, "required": [ "type", "function" ], "additionalProperties": false } }, { "type": "null" } ] }, "top_logprobs": { "anyOf": [ { "type": "integer", "minimum": 0, "maximum": 8 }, { "type": "null" } ] }, "top_p": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 1 }, { "type": "null" } ] }, "user": { "type": [ "string", "null" ] }, "web_search_options": { "type": "object", "properties": { "search_context_size": { "type": [ "string", "null" ] } }, "additionalProperties": false } }, "required": [ "messages" ], "additionalProperties": false }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "chat.completion" }, "created": { "type": "number" }, "model": { "type": "string" }, "choices": { "type": "array", "items": { "type": "object", "properties": { "index": { "type": "number" }, "finish_reason": { "type": [ "string", "null" ] }, "message": { "type": "object", "properties": { "role": { "type": "string" }, "content": { "type": [ "string", "null" ] }, "reasoning_content": { "type": [ "string", "null" ] }, "refusal": { "type": [ "string", "null" ] }, "tool_calls": { "anyOf": [ { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" }, "function": { "type": "object", "properties": { "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "name", "arguments" ], "additionalProperties": false } }, "required": [ "id", "type", "function" ], "additionalProperties": false } }, { "type": "null" } ] } }, "required": [ "role", "content" ], "additionalProperties": false }, "logprobs": { "anyOf": [ { "type": "object", "properties": { "content": { "anyOf": [ { "type": "array", "items": {} }, { "type": "null" } ] } }, "required": [ "content" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "index", "finish_reason", "message" ], "additionalProperties": false } }, "citations": { "anyOf": [ { "type": "array", "items": {} }, { "type": "null" } ] }, "output_files": { "anyOf": [ { "type": "array", "items": {} }, { "type": "null" } ] }, "system_fingerprint": { "type": [ "string", "null" ] }, "usage": { "type": "object", "properties": { "prompt_tokens": { "type": "number" }, "completion_tokens": { "type": "number" }, "total_tokens": { "type": "number" }, "prompt_tokens_details": { "type": "object", "properties": { "text_tokens": { "type": "number" }, "audio_tokens": { "type": "number" }, "image_tokens": { "type": "number" }, "cached_tokens": { "type": "number" } }, "required": [ "text_tokens", "audio_tokens", "image_tokens", "cached_tokens" ], "additionalProperties": false }, "completion_tokens_details": { "type": "object", "properties": { "reasoning_tokens": { "type": "number" }, "audio_tokens": { "type": "number" }, "accepted_prediction_tokens": { "type": "number" }, "rejected_prediction_tokens": { "type": "number" } }, "required": [ "reasoning_tokens", "audio_tokens", "accepted_prediction_tokens", "rejected_prediction_tokens" ], "additionalProperties": false }, "cost_in_usd_ticks": { "type": "number" }, "num_sources_used": { "type": "number" } }, "required": [ "prompt_tokens", "completion_tokens", "total_tokens" ], "additionalProperties": false } }, "required": [ "id", "object", "created", "model", "choices" ], "additionalProperties": false } } }