---
title: Gemini 3.5 Flash
description: Gemini 3.5 Flash is Google's fast multimodal model with frontier intelligence, superior search, and grounding capabilities.
image: https://developers.cloudflare.com/dev-products-preview.png
---

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

[Skip to content](#%5Ftop) 

![Google logo](https://developers.cloudflare.com/_astro/google.DyXKPTPP.svg) 

#  Gemini 3.5 Flash 

Text Generation • Google 

`google/gemini-3.5-flash` 

Gemini 3.5 Flash is Google's fast multimodal model with frontier intelligence, superior search, and grounding capabilities.

| Model Info                                                                 |                                                                                                                           |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Context Window[ ↗](https://developers.cloudflare.com/workers-ai/glossary/) | 1,048,576 tokens                                                                                                          |
| Terms and License                                                          | [link ↗](https://ai.google.dev/gemini-api/terms)                                                                          |
| More information                                                           | [link ↗](https://deepmind.google/technologies/gemini/)                                                                    |
| Request formats                                                            | Chat Completions                                                                                                          |
| Pricing                                                                    | [View pricing in the Cloudflare dashboard ↗](https://dash.cloudflare.com/?to=/:account/ai/models/google/gemini-3.5-flash) |

## Usage

* [ TypeScript ](#tab-panel-608)
* [ cURL ](#tab-panel-609)

TypeScript

```
const response = await env.AI.run(  'google/gemini-3.5-flash',  { contents: [{ parts: [{ text: 'What are the three laws of thermodynamics?' }], role: 'user' }] },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "google/gemini-3.5-flash",  "input": {    "contents": [      {        "parts": [          {            "text": "What are the three laws of thermodynamics?"          }        ],        "role": "user"      }    ]  }}'
```

* [ Output ](#tab-panel-616)
* [ Raw response ](#tab-panel-617)

While there are actually **four** fundamental laws of thermodynamics, they are numbered from Zero to Three. 

Here are the **Three Laws of Thermodynamics** (traditionally numbered 1, 2, and 3), followed by the "Zeroth" law which was added later.

---

### 1. The First Law: The Law of Conservation of Energy
This law states that **energy cannot be created or destroyed; it can only change forms.** The total amount of energy in an isolated system remains constant.

*   **In simple terms:** You cannot get energy from nothing. If a system does work or releases heat, it must lose an equivalent amount of internal energy.
*   **Example:** A car engine converts the chemical energy of gasoline into mechanical energy (movement) and thermal energy (heat). No energy is lost; it just changes form.

### 2. The Second Law: The Law of Entropy
This law states that **the total entropy (a measure of disorder or randomness) of an isolated system will always increase over time.** It also establishes that heat flows naturally from hotter objects to colder objects, never the reverse.

*   **In simple terms:** Things naturally progress from order to disorder. Natural processes are irreversible.
*   **Example:** If you drop a hot cup of coffee, the heat disperses into the cooler room. The room gets slightly warmer, but that heat will never spontaneously concentrate back into the coffee cup to make it hot again.

### 3. The Third Law: The Law of Absolute Zero
This law states that **as the temperature of a system approaches absolute zero (0 Kelvin, or -273.15°C / -459.67°F), the entropy of the system approaches a constant minimum.** For a perfect crystal, entropy becomes exactly zero at absolute zero.

*   **In simple terms:** It is impossible to cool any system down to absolute zero in a finite number of steps, because as you get closer, it becomes infinitely harder to remove the remaining heat. At absolute zero, all molecular motion stops.
*   **Example:** Scientists can get objects incredibly close to absolute zero (within billionths of a degree), but they can never reach absolute zero because some heat will always leak back in.

---

### *The "Bonus" Law: The Zeroth Law (Thermal Equilibrium)*
Scientists realized *after* the First and Second laws were established that a more fundamental law was needed to define temperature. Rather than renumbering the existing laws, they called it the **Zeroth Law**.

*   **What it states:** If System A is in thermal equilibrium with System B, and System B is in thermal equilibrium with System C, then System A is in thermal equilibrium with System C.
*   **In simple terms:** This is the law that makes thermometers work. If two objects are the same temperature as a third object, they are the same temperature as each other.

---

### The Famous "Humorous" Summary
Physicists often summarize the laws of thermodynamics as a game you cannot win:
*   **First Law:** You can't win. (You can't get more energy out than you put in).
*   **Second Law:** You can't break even. (You can't even get back all the energy you put in; some is always wasted as heat/entropy).
*   **Third Law:** You can't get out of the game. (You can't reach absolute zero to stop the process entirely).

```
{  "candidates": [    {      "content": {        "role": "model",        "parts": [          {            "text": "While there are actually **four** fundamental laws of thermodynamics, they are numbered from Zero to Three. \n\nHere are the **Three Laws of Thermodynamics** (traditionally numbered 1, 2, and 3), followed by the \"Zeroth\" law which was added later.\n\n---\n\n### 1. The First Law: The Law of Conservation of Energy\nThis law states that **energy cannot be created or destroyed; it can only change forms.** The total amount of energy in an isolated system remains constant.\n\n*   **In simple terms:** You cannot get energy from nothing. If a system does work or releases heat, it must lose an equivalent amount of internal energy.\n*   **Example:** A car engine converts the chemical energy of gasoline into mechanical energy (movement) and thermal energy (heat). No energy is lost; it just changes form.\n\n### 2. The Second Law: The Law of Entropy\nThis law states that **the total entropy (a measure of disorder or randomness) of an isolated system will always increase over time.** It also establishes that heat flows naturally from hotter objects to colder objects, never the reverse.\n\n*   **In simple terms:** Things naturally progress from order to disorder. Natural processes are irreversible.\n*   **Example:** If you drop a hot cup of coffee, the heat disperses into the cooler room. The room gets slightly warmer, but that heat will never spontaneously concentrate back into the coffee cup to make it hot again.\n\n### 3. The Third Law: The Law of Absolute Zero\nThis law states that **as the temperature of a system approaches absolute zero (0 Kelvin, or -273.15°C / -459.67°F), the entropy of the system approaches a constant minimum.** For a perfect crystal, entropy becomes exactly zero at absolute zero.\n\n*   **In simple terms:** It is impossible to cool any system down to absolute zero in a finite number of steps, because as you get closer, it becomes infinitely harder to remove the remaining heat. At absolute zero, all molecular motion stops.\n*   **Example:** Scientists can get objects incredibly close to absolute zero (within billionths of a degree), but they can never reach absolute zero because some heat will always leak back in.\n\n---\n\n### *The \"Bonus\" Law: The Zeroth Law (Thermal Equilibrium)*\nScientists realized *after* the First and Second laws were established that a more fundamental law was needed to define temperature. Rather than renumbering the existing laws, they called it the **Zeroth Law**.\n\n*   **What it states:** If System A is in thermal equilibrium with System B, and System B is in thermal equilibrium with System C, then System A is in thermal equilibrium with System C.\n*   **In simple terms:** This is the law that makes thermometers work. If two objects are the same temperature as a third object, they are the same temperature as each other.\n\n---\n\n### The Famous \"Humorous\" Summary\nPhysicists often summarize the laws of thermodynamics as a game you cannot win:\n*   **First Law:** You can't win. (You can't get more energy out than you put in).\n*   **Second Law:** You can't break even. (You can't even get back all the energy you put in; some is always wasted as heat/entropy).\n*   **Third Law:** You can't get out of the game. (You can't reach absolute zero to stop the process entirely).",            "thoughtSignature": "AY89a1+rHsoYmr4zo13WFFuONc7LS9+Qb629kRUXpef5oP+4bGGaSf2xmaJWXalx2O5uR+EQFZlHljF5gb6Mn31zgECDUxQgGiKp5rAhsIc+IBnPfJ6QbH6qUqV5n7Iaukzos7PeLX5J7xiaY9dMO8MaNKvesuZhRiJcwDGMI92bT/b0V6p9yl7BCknjSN3jZli4jyb5ddybaUkxzXwEFfrq+dJY0hgEDxcqfVRzm+0hoS6P0TmZoQZnOOpEAnCFHjx7RoT2fNts9g+K2fRsI6s610dgVG45iLA98Q+X6Dm9KFdz1BEssA8eSxvI8/DQ80rIukWVtXObmSF8t7ih/4g3wqxUxWPCIsX+YbJzFQSOGxTu0jsb0ylYlsMo6FAAPHT6bQuvZomAzYCNM/aV5d+QuEjMwOxK+bzis9P1KOruCtQXDYLLn0njcnLYr9oue3VpePlVsdWE/xWctPvHMfFkEOLVZtBusfmpCog23D/FT31TRaXJJ5uPX1ehodosef9/IbLNSsNblj7rh9GY9RutafTW6tyzejedlmf4JGUUO6yLtQJ9gvhTGGPgkIsOrZyk9L0WFKLspIvckHH1ncvLPmD6acPPlNKbGpP7t27zpqpI3rA5emVHCB028swoklpCpkCbmq22nvfa+6Wxt2SpiIloQ6+gYtEQO/duPatUaIl171g6UVWkoi1ScADrFuNcnXjsug0Oka7sC4TT2dxVpZFyuokOAZmqXygHTJuAEcy5b6UgTOynUgB/CUNpixwewyDYFvmalRqyCeyHHHjStvtlrC5qW/nNWfP2ndZfU/FLK2RF/H1kytg0M8gqAiFLbFU9Of1/dKtGeUixnRmMdLJ1+SuBSiIPkRmI+1H1ihl1BETEhzU+G8j/wa1rCEjxxOLqjNXQWNk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Ik+6IZTrdRE7xojcXmttSfb2+j93QbD00sJbCBdyO9GtjO4gXY8osSfJRgzIvBd71EuLw8CAIfBPMGriT0o/xe7qgbkNUJJwMwFCP/6JBMlz+GXDzQPaakFBKFoUcbagujuB3hjMgj7H9aG5/bCZ1RZDqSEyAst7dVzLOv4R7P1x+7VYVH/E2bY00XYuwOxqFxCoiQdtodURHOSIPUsG2K/DYIFHQthdQCPRy/64G5A48KFyCDlZjdxJtkr6AgLOt+NA6QYYcrpjhQ1wKpbeM2p18i3gj8WAM3246QA3BDJXs4izLeNc5KG34LagEzEkL+FKaevRThg4Gkwx14WaJRGquDb8BZz80G7HfTvo19ZjlJLBBhr31lneKFIQmkZtR/qrSk5g7zW7riDmbEO9pWCRslXSjB/gER0JiCif76XqGqxL47ILa71ttqQMuo/35Qkh3+6iEGN1/0S1ipyrqifkMKT07xcQa+nkvKyPSR8rzXKmSjE2EqDzL2jY3JUA4QvM9PaGSyz0JHVbbdftwDRQfVSbC3BxmOVe9L9qcXOdJ9bzr50ooGLYCYgCly4x3J8Q2NK4ZLcgETcY3f9/QWJAf0n/tRlfMWCOwMpKNrcs/merDqbWXCinegf9jZBi+ZSea6OSCqXxU/ntU33QDq3MhY3FXT9wXDGnFi6PDfqNLU691QRynIVnRpTd1O2drgHTsrCn52WOnTqkbjQcXi8gI2EZCZ0o6vVbSEDmuCjYjxklcneBWK4a0u490u00YlllUpsz7D5LjVVDaDzknozfKS2RXh4lTkYYezaPOGj4Jsmce/6NYiCQyS6SPN3YmdJB04YF6eIlue/rT4JPlkGQ9Nq9IThsMvcrDCoq7AncdhbvT9ZwrjM5XZZ8W+RwZBlgqg4jiMppwBf+x9uOw30by0tdsgZpcbrRZAjuQ7HtzrvsRc5j2oiY2v1T2L04/288Tf/lGrpQTLJARgl4oIdcTyshl"          }        ]      },      "finishReason": "STOP"    }  ],  "usageMetadata": {    "promptTokenCount": 8,    "candidatesTokenCount": 735,    "totalTokenCount": 1719,    "trafficType": "ON_DEMAND",    "promptTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 8      }    ],    "candidatesTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 735      }    ],    "thoughtsTokenCount": 976  },  "modelVersion": "gemini-3.5-flash",  "createTime": "2026-06-08T20:34:13.120988Z",  "responseId": "RScnapyxB-axodAP9r69oQ0",  "gatewayMetadata": {    "keySource": "Unified"  }}
```

## Examples

**With System Instruction**  — Using a system instruction to set context 

* [ TypeScript ](#tab-panel-610)
* [ cURL ](#tab-panel-611)

TypeScript

```
const response = await env.AI.run(  'google/gemini-3.5-flash',  {    contents: [{ parts: [{ text: 'How do I read a JSON file in Python?' }], role: 'user' }],    generationConfig: { temperature: 0.3 },    systemInstruction: {      parts: [{ text: 'You are a helpful coding assistant specializing in Python.' }],    },  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "google/gemini-3.5-flash",  "input": {    "contents": [      {        "parts": [          {            "text": "How do I read a JSON file in Python?"          }        ],        "role": "user"      }    ],    "generationConfig": {      "temperature": 0.3    },    "systemInstruction": {      "parts": [        {          "text": "You are a helpful coding assistant specializing in Python."        }      ]    }  }}'
```

* [ Output ](#tab-panel-618)
* [ Raw response ](#tab-panel-619)

To read a JSON file in Python, you should use the built-in `json` module. 

Here is the standard and most secure way to do it using a `with` statement (which ensures the file is properly closed after reading):

### The Standard Method

```python
import json

# Open the JSON file and load its contents
with open("data.json", "r", encoding="utf-8") as file:
    data = json.load(file)

# Now 'data' is a Python dictionary (or list, depending on your JSON structure)
print(data)
```

### How it works:
1. **`import json`**: Imports Python's built-in JSON library.
2. **`with open(...)`**: Opens the file. 
   * `"r"` means open in **read** mode.
   * `encoding='utf-8'` is highly recommended to prevent errors with special characters (like emojis or accented letters).
3. **`json.load(file)`**: Reads the file and converts the JSON data into a Python dictionary or list.

---

### Other Common Scenarios

#### 1. Reading a JSON String (not a file)
If you already have the JSON data as a string in your code, use `json.loads()` (the "s" stands for **string**):

```python
import json

json_string = '{"name": "Alice", "age": 30}'

# Parse the string
data = json.loads(json_string)
print(data["name"])  # Output: Alice
```

#### 2. Reading JSON with Pandas (for Data Science)
If you are doing data analysis and want to load the JSON directly into a DataFrame, you can use the `pandas` library:

```python
import pandas as pd

# Load JSON into a DataFrame
df = pd.read_json("data.json")
print(df.head())
```

```
{  "candidates": [    {      "content": {        "role": "model",        "parts": [          {            "text": "To read a JSON file in Python, you should use the built-in `json` module. \n\nHere is the standard and most secure way to do it using a `with` statement (which ensures the file is properly closed after reading):\n\n### The Standard Method\n\n```python\nimport json\n\n# Open the JSON file and load its contents\nwith open(\"data.json\", \"r\", encoding=\"utf-8\") as file:\n    data = json.load(file)\n\n# Now 'data' is a Python dictionary (or list, depending on your JSON structure)\nprint(data)\n```\n\n### How it works:\n1. **`import json`**: Imports Python's built-in JSON library.\n2. **`with open(...)`**: Opens the file. \n   * `\"r\"` means open in **read** mode.\n   * `encoding='utf-8'` is highly recommended to prevent errors with special characters (like emojis or accented letters).\n3. **`json.load(file)`**: Reads the file and converts the JSON data into a Python dictionary or list.\n\n---\n\n### Other Common Scenarios\n\n#### 1. Reading a JSON String (not a file)\nIf you already have the JSON data as a string in your code, use `json.loads()` (the \"s\" stands for **string**):\n\n```python\nimport json\n\njson_string = '{\"name\": \"Alice\", \"age\": 30}'\n\n# Parse the string\ndata = json.loads(json_string)\nprint(data[\"name\"])  # Output: Alice\n```\n\n#### 2. Reading JSON with Pandas (for Data Science)\nIf you are doing data analysis and want to load the JSON directly into a DataFrame, you can use the `pandas` library:\n\n```python\nimport pandas as pd\n\n# Load JSON into a DataFrame\ndf = pd.read_json(\"data.json\")\nprint(df.head())\n```",            "thoughtSignature": "AY89a18qMqRbC6jUdfpqPMJZFOdHxrMWgA80pVwEdCki3rzJAus2ozHxO+yjLaoSA0yMkUGjZIeuJjMR2AvbplB6Q8GE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XF6CvwP6q+T150t6ZhphiInXnak2hDD822JyVF5HCVavOrngSTU6aovYXHVmZrWnEE0GbV3GB6iVEz6uw2bZl2f+QTJyrwBSD7XcxDvvQyJRhhPP4xeFp/RE8gc34OpTBwWScWa3C2F6APY6RjNrYFOdI3i/IZlGXWczEaXTQo4NHM0ALHmj/+YuHniuT0qMTMrmlqPo+M0lbPPhlR1TNfI5Sr/7he/QevThbwh8HY1aB0Ezbo513CnVY+JWhbiQd3y9s4gHFtiPUCFixmYpbFaMTv2rmeuDrkjPuHGwQpYE5iP9ewTL75Wzh8dGf1A5g0B4KnmTTbN94nZjf/lFt6efPt6qKyl8785ctLKVkQwNyHiy1q5Qv7BrGHuU0"          }        ]      },      "finishReason": "STOP"    }  ],  "usageMetadata": {    "promptTokenCount": 20,    "candidatesTokenCount": 422,    "totalTokenCount": 1165,    "trafficType": "ON_DEMAND",    "promptTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 20      }    ],    "candidatesTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 422      }    ],    "thoughtsTokenCount": 723  },  "modelVersion": "gemini-3.5-flash",  "createTime": "2026-06-08T20:34:23.284583Z",  "responseId": "TycnaqevEamO4_UPsMub-Qc",  "gatewayMetadata": {    "keySource": "Unified"  }}
```

**Multi-turn Conversation**  — Continuing a conversation with context 

* [ TypeScript ](#tab-panel-620)
* [ cURL ](#tab-panel-621)

TypeScript

```
const response = await env.AI.run(  'google/gemini-3.5-flash',  {    contents: [      {        parts: [{ text: 'I need help planning a road trip from San Francisco to Los Angeles.' }],        role: 'user',      },      {        parts: [          {            text: "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: 'model',      },      { parts: [{ text: 'Yes, what are some good places to stop?' }], role: 'user' },    ],    generationConfig: { maxOutputTokens: 2048 },  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "google/gemini-3.5-flash",  "input": {    "contents": [      {        "parts": [          {            "text": "I need help planning a road trip from San Francisco to Los Angeles."          }        ],        "role": "user"      },      {        "parts": [          {            "text": "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": "model"      },      {        "parts": [          {            "text": "Yes, what are some good places to stop?"          }        ],        "role": "user"      }    ],    "generationConfig": {      "maxOutputTokens": 2048    }  }}'
```

* [ Output ](#tab-panel-622)
* [ Raw response ](#tab-panel-623)

To give you the best recommendations, it helps to know which route you’re planning to take. 

There are two main scenic ways to make this drive: **The Iconic Coastal Route (Highway 1)** and **The Central Valley/Wine Route (US-101)**. (The third option, Interstate 5, is the fastest at 5.5 hours, but it is mostly flat farmland with very few scenic stops).

Here are the best places to stop along the two scenic routes:

---

### Option 1: The Iconic Coastal Route (Highway 1 / PCH)
*Best for: Breathtaking ocean cliffs, beaches, and nature. (3-4 days recommended)*
* **Crucial Note:** Check current road conditions before you go. Highway 1 in the Big Sur region is prone to landslides, and parts of it are occasionally closed, requiring a detour to Highway 101.

*   **Santa Cruz:** Known for its vintage beach boardwalk, surfing culture, and redwoods just inland. Great for a quick walk on the pier.
*   **Monterey & Carmel-by-the-Sea:** Visit the world-famous Monterey Bay Aquarium, drive the gorgeous **17-Mile Drive**, and walk through Carmel, a fairytale-like village with no street addresses or streetlights.
*   **Big Sur:** Drive across the famous **Bixby Creek Bridge**, hike in Julia Pfeiffer Burns State Park to see **McWay Falls** (a waterfall that drops directly onto the beach), and grab lunch at Nepenthe for cliffside views.
*   **San Simeon:** Home to **Hearst Castle** (the lavish estate of publishing tycoon William Randolph Hearst) and the **Elephant Seal Vista Point**, where you can see hundreds of wild elephant seals lounging on the beach.
*   **Morro Bay:** Famous for "Morro Rock," a massive volcanic plug standing right in the harbor. It’s a great, quiet spot for kayaking or getting fresh seafood.
*   **Solvang:** A quirky, authentic Danish village tucked into the Santa Ynez Valley. Stop here for Danish bakeries, windmills, and wine tasting.
*   **Santa Barbara:** Known as the "American Riviera." Stop here to see the historic Old Mission, walk down State Street for shopping and dining, or visit the Funk Zone for trendy wine-tasting rooms.
*   **Malibu:** Grab a bite at the Malibu Farm Cafe at the end of the Malibu Pier as you make your final approach into LA.

---

### Option 2: The Central Valley/Wine Route (US-101)
*Best for: Wine tasting, historic missions, and a faster but still beautiful drive. (1-2 days)*
*If Highway 1 is closed in Big Sur, this is your best alternative.*

*   **Pinnacles National Park:** Just east of the 101, this is California's newest National Park. It features dramatic volcanic rock formations, caves you can hike through, and is one of the few places to spot the endangered California Condor.
*   **Paso Robles:** A world-class wine region known for its bold Zinfandels and Rhone-style blends. If you stay overnight, don't miss **Sensorio**, a stunning, massive outdoor light installation in the hills.
*   **San Luis Obispo (SLO):** A charming college town with a historic mission, a great Thursday night farmers market, and "Bubblegum Alley" (a quirky alleyway lined with chewed gum).
*   **Pismo Beach:** Just south of SLO, famous for its wide-open beaches and the Oceano Dunes, where you can drive vehicles right onto the sand.
*   **Santa Barbara & Solvang:** (Both Highway 1 and US-101 merge here, so these are great stops on either route!)

---

### To help me narrow this down for you:
1. **How many days** do you have for the trip? (Are you doing this in one day, or making a weekend out of it?)
2. **What are you most interested in?** (e.g., wine tasting, hiking, beaches, cute towns, or food?)

```
{  "candidates": [    {      "content": {        "role": "model",        "parts": [          {            "text": "To give you the best recommendations, it helps to know which route you’re planning to take. \n\nThere are two main scenic ways to make this drive: **The Iconic Coastal Route (Highway 1)** and **The Central Valley/Wine Route (US-101)**. (The third option, Interstate 5, is the fastest at 5.5 hours, but it is mostly flat farmland with very few scenic stops).\n\nHere are the best places to stop along the two scenic routes:\n\n---\n\n### Option 1: The Iconic Coastal Route (Highway 1 / PCH)\n*Best for: Breathtaking ocean cliffs, beaches, and nature. (3-4 days recommended)*\n* **Crucial Note:** Check current road conditions before you go. Highway 1 in the Big Sur region is prone to landslides, and parts of it are occasionally closed, requiring a detour to Highway 101.\n\n*   **Santa Cruz:** Known for its vintage beach boardwalk, surfing culture, and redwoods just inland. Great for a quick walk on the pier.\n*   **Monterey & Carmel-by-the-Sea:** Visit the world-famous Monterey Bay Aquarium, drive the gorgeous **17-Mile Drive**, and walk through Carmel, a fairytale-like village with no street addresses or streetlights.\n*   **Big Sur:** Drive across the famous **Bixby Creek Bridge**, hike in Julia Pfeiffer Burns State Park to see **McWay Falls** (a waterfall that drops directly onto the beach), and grab lunch at Nepenthe for cliffside views.\n*   **San Simeon:** Home to **Hearst Castle** (the lavish estate of publishing tycoon William Randolph Hearst) and the **Elephant Seal Vista Point**, where you can see hundreds of wild elephant seals lounging on the beach.\n*   **Morro Bay:** Famous for \"Morro Rock,\" a massive volcanic plug standing right in the harbor. It’s a great, quiet spot for kayaking or getting fresh seafood.\n*   **Solvang:** A quirky, authentic Danish village tucked into the Santa Ynez Valley. Stop here for Danish bakeries, windmills, and wine tasting.\n*   **Santa Barbara:** Known as the \"American Riviera.\" Stop here to see the historic Old Mission, walk down State Street for shopping and dining, or visit the Funk Zone for trendy wine-tasting rooms.\n*   **Malibu:** Grab a bite at the Malibu Farm Cafe at the end of the Malibu Pier as you make your final approach into LA.\n\n---\n\n### Option 2: The Central Valley/Wine Route (US-101)\n*Best for: Wine tasting, historic missions, and a faster but still beautiful drive. (1-2 days)*\n*If Highway 1 is closed in Big Sur, this is your best alternative.*\n\n*   **Pinnacles National Park:** Just east of the 101, this is California's newest National Park. It features dramatic volcanic rock formations, caves you can hike through, and is one of the few places to spot the endangered California Condor.\n*   **Paso Robles:** A world-class wine region known for its bold Zinfandels and Rhone-style blends. If you stay overnight, don't miss **Sensorio**, a stunning, massive outdoor light installation in the hills.\n*   **San Luis Obispo (SLO):** A charming college town with a historic mission, a great Thursday night farmers market, and \"Bubblegum Alley\" (a quirky alleyway lined with chewed gum).\n*   **Pismo Beach:** Just south of SLO, famous for its wide-open beaches and the Oceano Dunes, where you can drive vehicles right onto the sand.\n*   **Santa Barbara & Solvang:** (Both Highway 1 and US-101 merge here, so these are great stops on either route!)\n\n---\n\n### To help me narrow this down for you:\n1. **How many days** do you have for the trip? (Are you doing this in one day, or making a weekend out of it?)\n2. **What are you most interested in?** (e.g., wine tasting, hiking, beaches, cute towns, or food?)",            "thoughtSignature": "AY89a1+RSw3izWhv91qBq++oOCAKdBdIfuEXRL6KkcT8QxwfL8n7FVLLD/7atWacNOqF/WDHom42ee2Elzv+XydRRH0dPfh/ekI8E6dgOaz0nClFG0xbawqUSH/0x5N6apdmSzGU1jNFiKW9Pyf4yq9ab3Dv8SzoUy+n4245X2juYWAt5VO6dRaA3Y8bObPduovnt7eJE1CLtXA2wB7fdYF4DdqBuSfAc+/19ozJ5MoNuYzCRERDVMW+nEq2cZwQ8Nfoglj6WMcpBm3C8BP3tNGKjkSj9xHwWAcOkdf99C2uCPOL3dp33JY4FLa3W/AI0nLCIg0L3tduo6HF+/xoyWBEcI5OhxiNqjayiVpeeSGB8U4Z/+c3ymi4GJRRYNq8hVtouW8zCtCGaVWrzARsT6dgBiqAJzsgYrf4d2n2Vp9ef4BvzMtyEqCcdkS37hCeo60gE9rIzKCRL6hwdOoc6rieGryhg07NN2lN5V/boeVfDdhP63VDeFaaVHXnwdY4stYtkjIQ7IIpVHYdyR9/hxuM1iFc+vfwRM53+CFQOw7Ned7fSFRrR1ec5XqfAeNSnA/TQOGTmp2vZhJ8MwY1atVQoKxa1rf1zFRU7a0FbZACjSwL5goR41KKN4IbJMywoCzfCmKBPqbsqpGqKdCLk+pEA8J2/eVL9+SFKy9EpmcZZ1R7HUgdfIAm5ZAzRX91mv8c/coTgnDdGR3XHJ69JpohwBT5rdYlv/uT9iiGHx0sxu/rlp1g4TBP8L7Zfk7J1+K2G/njtJadeRjSIZ4Nyv2evZ/7nj+UVAPeqOiaJAVI8i9JzaWt+obEDuzl8iStLTFnlmMI3OnS4u2W834gOZlf8w1ziFLps951sLSstX7eP4sXe3pOQZ+HU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HXfQBQxCWebsi/VHcX3L/iII2Q3wh+hu0be3Hy98oAaITSXLbJJch"          }        ]      },      "finishReason": "STOP"    }  ],  "usageMetadata": {    "promptTokenCount": 64,    "candidatesTokenCount": 888,    "totalTokenCount": 1812,    "trafficType": "ON_DEMAND",    "promptTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 64      }    ],    "candidatesTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 888      }    ],    "thoughtsTokenCount": 860  },  "modelVersion": "gemini-3.5-flash",  "createTime": "2026-06-08T20:34:30.085273Z",  "responseId": "VicnapmaBeWW4_UPgJf74AQ",  "gatewayMetadata": {    "keySource": "Unified"  }}
```

**Creative Writing**  — Higher temperature for creative output 

* [ TypeScript ](#tab-panel-612)
* [ cURL ](#tab-panel-613)

TypeScript

```
const response = await env.AI.run(  'google/gemini-3.5-flash',  {    contents: [      {        parts: [{ text: 'Write a short story opening about a detective finding an unusual clue.' }],        role: 'user',      },    ],    generationConfig: { maxOutputTokens: 4096, temperature: 0.8 },  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "google/gemini-3.5-flash",  "input": {    "contents": [      {        "parts": [          {            "text": "Write a short story opening about a detective finding an unusual clue."          }        ],        "role": "user"      }    ],    "generationConfig": {      "maxOutputTokens": 4096,      "temperature": 0.8    }  }}'
```

* [ Output ](#tab-panel-624)
* [ Raw response ](#tab-panel-625)

The rain against the penthouse glass sounded like a handful of gravel thrown repeatedly against the window. Detective Silas Thorne ignored it, kneeling beside the body of Julian Vance. Vance, a billionaire philanthropist with a reputation for pristine health, sat upright in his velvet wingback chair, looking less like a corpse and more like a man waiting for a late-night guest. There were no signs of struggle, no traces of poison in the half-empty scotch glass, and no marks on his throat. 

Thorne snapped on a pair of latex gloves and leaned closer, tilting Vance’s chin upward. Under the harsh, sterile beam of his penlight, the dead man’s mouth was slightly agape. 

Thorne tapped the victim’s teeth with the metal tip of his pen. *Clack. Clack. Click.*

The sound of the left rear molar was too hollow, too metallic. Thorne reached for his forceps, gently gripping the tooth, expecting a loose crown. Instead, with a soft, wet pop, the entire tooth slipped effortlessly out of the gumline. 

It wasn’t bone.

Thorne held the object up to the light. It was a masterpiece of micro-engineering: a molar carved from translucent white jade, capped in tarnished silver. But it was what lay *inside* the jade that made Thorne’s breath hitch. Encased in the stone was a microscopic brass gear, no larger than a grain of sand, turning in perfect, silent rhythm. 

Frowning, Thorne pressed the tiny tooth to his ear. 

From the depths of the dead man's molar, a microscopic music box was playing a tinny, three-note lullaby. It was the exact melody Thorne's mother used to hum to him when he was a boy—a song he had never told a living soul about.

```
{  "candidates": [    {      "content": {        "role": "model",        "parts": [          {            "text": "The rain against the penthouse glass sounded like a handful of gravel thrown repeatedly against the window. Detective Silas Thorne ignored it, kneeling beside the body of Julian Vance. Vance, a billionaire philanthropist with a reputation for pristine health, sat upright in his velvet wingback chair, looking less like a corpse and more like a man waiting for a late-night guest. There were no signs of struggle, no traces of poison in the half-empty scotch glass, and no marks on his throat. \n\nThorne snapped on a pair of latex gloves and leaned closer, tilting Vance’s chin upward. Under the harsh, sterile beam of his penlight, the dead man’s mouth was slightly agape. \n\nThorne tapped the victim’s teeth with the metal tip of his pen. *Clack. Clack. Click.*\n\nThe sound of the left rear molar was too hollow, too metallic. Thorne reached for his forceps, gently gripping the tooth, expecting a loose crown. Instead, with a soft, wet pop, the entire tooth slipped effortlessly out of the gumline. \n\nIt wasn’t bone.\n\nThorne held the object up to the light. It was a masterpiece of micro-engineering: a molar carved from translucent white jade, capped in tarnished silver. But it was what lay *inside* the jade that made Thorne’s breath hitch. Encased in the stone was a microscopic brass gear, no larger than a grain of sand, turning in perfect, silent rhythm. \n\nFrowning, Thorne pressed the tiny tooth to his ear. \n\nFrom the depths of the dead man's molar, a microscopic music box was playing a tinny, three-note lullaby. It was the exact melody Thorne's mother used to hum to him when he was a boy—a song he had never told a living soul about.",            "thoughtSignature": "AY89a19lgSQcev60/qplEo1TLqK0IE3xXnRTo+cVH2SFO4EYasSdVPkP4TlNyNu81RlWp1Uhc8aEhWO6stpq3Oic0j5/Jdzyf1Q01DjWVBJQeggrNov/nP8ecj2BTOKUae/RFVeMTvpNwKPDxp4gKzcxeNN0PSOe7RgXp5V6hnGSYJB1oXBhG9QV1FE4sm1U9Z+azRcSKGvNIqZzfWZGvhohKArD9D7jpr45NkzLqcHKGgnEMIKjsouMj5ZhItiUQFMdaQxLqUHH/u6B3MivL5SCXTcy3+7zN4V/ZbwnRe5jiaqP2uTC67dpcWx4N/gQtfv0m76ZTsGTkXC1MEzMnwmbiKPPKlS3UD/oD2FVdNyviTbxsv5Y3lFhjJbb7Xez+tVt71hFSZ021jg7b5zT/QJDNU2H3baanZ8kqktsBWr2137fMzoStuVRfMq55WdlpzegnV+j90LWZHGr5c0N0jEaJUu1NcpvbrJcRztndJbh1QiyFo2flrQzg9zhAuBHMHIl5cuC5oanxCK0KBkYkJoamaAUPKFNgNZV6O0Q9K74ZYOfxCOpIVkwhq1MBdmqf1XzhIJNTMfGfL6odfPE5b87P5PBjUL/3t25Bh+HfSgCIDiCR/dE/9Z7AgR+o/A4EsGlsVTIcLtXccfv/ys/yNmx+bM2dMqxCGcDpbtllEutE+rd1rJaudYU04IziKxklSroxEi0w4rT2Oq2Clm/DRdzb07xahyEuQH65TWfus8Tzdc8iv0oq/7Tmd3onHC3x71bIq0TDwj6IV72pnrMvwJt8Tgp0YZPdvLUSvH1eZulyD3EyZ8sfvEFaba6OQN47X3PHlYk0IYlz1QD4Fs7CwtnBY3nTCwRimdUZh5V3HBK8KzASpsiekd36qQsHdFHOciYbYK4RaNd4BWh04MM1a+7hv6+1qihnLrTis2Ofef3FCc+S5ck4guxWmkPLSY8RnO+PaIJIbJWCy+D9sc69UzzUT7AsyDY3VCVvCp723AeEQ28/Z9NLgtswBCHsxT8FHMYY3jKR3bXlX8nIl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Dz8xPojymZ11EKKBjrtyAQuXHFn74vfxtIjRCQIg/Ko8LIxir5G3ymCQiP/42jmQvK+giTNTjcZwlE5NIJFqbfW0F295q/KELF8EeSZA73md/KwlrhCmuMlEk+alwCnwbXgWEVm+y9svrJvXj7rxA/r7PoLDbASn+df5ZHp5BVqGZRtMJsrHgECO1hqFHhTO5gy9ZtrOEzkr2077oRytOdm/X3YLCBnqOHzv0mRR1R3V09KKP1YMcPbNAMWiE9+PnZLWTPKaRTsHqMV/vNjvCmhmO7kum5/A4GCH0HyazSOfVRP/XhRdIanF7pfObjIXFYFwMK1etclwDxcJKUHLF9BFgwgE4YKoScT5+iJ8emVRrBMYo+X8jPA3vZXjRFN9zYRFdlMo7uFAnZ8ZvA7/Elf77zu9r7BAE5X7zImXuy5CWWqQ81s8ndBHRpnmv+r4lACsLxqE7SPBOTkfnkSJWchOBq06ByKGeTpBX+hgVEyTK4zSo5U27pnKZVLDZ68brI4H7O7doNcv5oSRAOL+Tz1Mhons8DdvBTeNY9cwBryNelJpp84iS32PFq7XFTAPPPwqVngBkMEkJM/nIB5qzzXRb8EJ5cupVZmqDvzUALkO9esd/dIVpeoLOSbt7lPck9GI8S+ZqtrStQ6926GpSJMND5LgDcMuzfcpXl+oINxLmRYB6a2LgqXS+sUGObUq/xmPg=="          }        ]      },      "finishReason": "STOP"    }  ],  "usageMetadata": {    "promptTokenCount": 13,    "candidatesTokenCount": 379,    "totalTokenCount": 2124,    "trafficType": "ON_DEMAND",    "promptTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 13      }    ],    "candidatesTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 379      }    ],    "thoughtsTokenCount": 1732  },  "modelVersion": "gemini-3.5-flash",  "createTime": "2026-06-08T20:34:42.810405Z",  "responseId": "YicnaqW7MZyfq8YPksChgAE",  "gatewayMetadata": {    "keySource": "Unified"  }}
```

**Image Understanding**  — Sending an image with a text prompt for visual understanding 

* [ TypeScript ](#tab-panel-614)
* [ cURL ](#tab-panel-615)

TypeScript

```
const response = await env.AI.run(  'google/gemini-3.5-flash',  {    contents: [      {        parts: [          { text: 'What logo is shown in this image? Describe its colors and design.' },          {            inlineData: {              mimeType: 'image/png',              data: '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',            },          },        ],        role: 'user',      },    ],  },)console.log(response)
```

Terminal window

```
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \  --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \  --header "Content-Type: application/json" \  --data '{  "model": "google/gemini-3.5-flash",  "input": {    "contents": [      {        "parts": [          {            "text": "What logo is shown in this image? Describe its colors and design."          },          {            "inlineData": {              "mimeType": "image/png",              "data": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAC/VBMVEUAAAAzhPwzhPwyhPwzhPoyg/sonYslp1swiuD/vgDwQivwQivvQivvQivxQyzwQivwQC3uQizwQizvQivyRSvwQyvvQivvQivwQyvvQyvwQyr/vgD/vwD/tAD/vwD/vwD/vwD/vwD/vwD/vgD/vwD/vgDwQivwQizvQivvQivwQizwQyvwQyvuRC3vQizwQi3wQivwQivsQyjvQyvwQizwQivrQy/wQivwQivyRCr/SkryRS3wQirwQivxQSrvQisyhPwyg/sjqkjvQywyg/z/vwDwQyv/vgDxUCfSug4kqkjMuRHwQizwQyvxQSrwQivvQys1gvnxQSvwQizwQyzxTyj9rAf/vwDUuw0kqkgkqkkkqVEvit4zhPswid8wieAyhPv/vgD/vwAkqkjNuRDvQizwQiwyg/wyg/wyg/szg/wyhPo4f/8yhPsyhPsxhf8vh/8yhPsyg/wugv8yhPzvQiwkqkgjqkgkqkgbrVIjqkkjqUkjqUkjqkgkqkcjqkgiqkcjqkgjqkgkqUkkqkgkqUgjqkgjqkgnqkcjqkgjpUcjqkklqUcjqkkjqUgkqkgkqUgAxWwjqkgkqkgjqkknqkcjqkkiqkgjqkgjqkgjqkgjqUkutlkjqkkjqkgjqkgjqkkkqkgjqkgfqkojqkjvQiwjqkn/vwD/vgD/vQD/vgD/vwD/vwD/vwD/vwD/vwD/vwD/vwD/vgD/vwD/vgD/vwD/vwD/vwD/vwD/vgD/vwD/vgAzhPwzhPwyhPwxgvsyhPsyg/szhP8zg/oyg/sqi/8zgP8yhPsyg/wzhPszhPwyh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sh86YLw7P5+SA7OH5I/GBYh/HtHN8cByl6L/+Hy+ZRCHusq/MN4hbRTvNyopwAAAAASUVORK5CYII="            }          }        ],        "role": "user"      }    ]  }}'
```

* [ Output ](#tab-panel-626)
* [ Raw response ](#tab-panel-627)

The logo shown in the image is the **Google "G" logo** (specifically, the "Super G" icon used for Google Search, the Google app, and various other Google services).

### **Design and Colors:**
*   **Shape:** It is a stylized, geometric representation of the capital letter **"G"** designed within a circular framework.
*   **Color Segments:** The logo is divided into four distinct, vibrant color segments:
    *   **Blue:** Covers the right side, including the horizontal crossbar that extends into the center of the circle.
    *   **Red:** Arches across the top section.
    *   **Yellow:** Covers the left side.
    *   **Green:** Arches across the bottom section.
*   **Background:** In this specific image, the logo is set against a solid **black** background.

```
{  "candidates": [    {      "content": {        "role": "model",        "parts": [          {            "text": "The logo shown in the image is the **Google \"G\" logo** (specifically, the \"Super G\" icon used for Google Search, the Google app, and various other Google services).\n\n### **Design and Colors:**\n*   **Shape:** It is a stylized, geometric representation of the capital letter **\"G\"** designed within a circular framework.\n*   **Color Segments:** The logo is divided into four distinct, vibrant color segments:\n    *   **Blue:** Covers the right side, including the horizontal crossbar that extends into the center of the circle.\n    *   **Red:** Arches across the top section.\n    *   **Yellow:** Covers the left side.\n    *   **Green:** Arches across the bottom section.\n*   **Background:** In this specific image, the logo is set against a solid **black** background.",            "thoughtSignature": "AY89a1/5q1bTPB9D6PLxX7+jrWKT1+chZMM/cs1X1RkxRz6/DYbn0g1kS8NGv05YGsXHQylBdy/tqz0QE3CQ20Zn92ChpFLj6kMZ3vhG7q4/lG2Ln+/O/srxp9rl6R0TAqgGmkMsZu+V1KhccrmkFpVhKQGHoroKXovf2yuvRJq0+zpRwV0A2V2N7ZEsBRPP4XqTp66wkIIzpL61NatnxY76UrAV/OPzw+CRqMU52WG2lKbng26iPudIn27LpRvXgnmiZT4Rr1hgOzge5ISQ6kGOCSUvolI8W0NhsWmT4yXNP+xKE4WwN4W7QHI1Ws/Yh2vbD8z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M9ZpvVLQIdNmeSm3EvMl7xsdm9MGQJe2Fbtshr9swUPVy/Fvdg0COuteQmCJnHIn5ZWqh3NV19sIC6Hm4fMMRmFr9wSA53ySKYmzYgk/vDr0SwTia8jdX+IAD7oZC4pP9L8or8iwK+nKr2OyIaJcQe1qrr+VE5n2Xqq04Q45Z8j/KAvk+w6NRH1yJ+zsIwcs8Bfh9OO0kqhn5RyRTzd1LxO/yWFbgM9hilcZDLDXDfoCWqLB9aUCgr8wjZ5cfdxVY8N/Ne/V+YBAZPLFDvkj4zWLrTuQs+JQurXh9klN/T4Efxh6uqNbnoI260NGk8G8rsFdKWZtSVIU8uMEzIXFjRjWZ0ioiKFmHQ+m+q"          }        ]      },      "finishReason": "STOP"    }  ],  "usageMetadata": {    "promptTokenCount": 1103,    "candidatesTokenCount": 183,    "totalTokenCount": 1807,    "trafficType": "ON_DEMAND",    "promptTokensDetails": [      {        "modality": "IMAGE",        "tokenCount": 1089      },      {        "modality": "TEXT",        "tokenCount": 14      }    ],    "candidatesTokensDetails": [      {        "modality": "TEXT",        "tokenCount": 183      }    ],    "thoughtsTokenCount": 521  },  "modelVersion": "gemini-3.5-flash",  "createTime": "2026-06-08T20:34:56.911323Z",  "responseId": "cCcnatvPN8e64_UPks6J8A8",  "gatewayMetadata": {    "keySource": "Unified"  }}
```

## Parameters

Schema variant

Generate ContentChat Completions

* [ Input ](#tab-panel-628)
* [ Output ](#tab-panel-629)

▶contents\[\]

`array`required

▶systemInstruction{}

`object`

▶generationConfig{}

`object`

▶safetySettings\[\]

`array`

▶tools\[\]

`array`

toolConfig

``

▶messages\[\]

`array`required

temperature

`number`minimum: 0maximum: 2

max\_tokens

`number`exclusiveMinimum: 0

max\_completion\_tokens

`number`exclusiveMinimum: 0

top\_p

`number`minimum: 0maximum: 1

frequency\_penalty

`number`minimum: \-2maximum: 2

presence\_penalty

`number`minimum: \-2maximum: 2

stream

`boolean`

▶stream\_options{}

`object`

▶tools\[\]

`array`

tool\_choice

``

response\_format

``

▶modalities\[\]

`array`

▶audio{}

`object`

▶candidates\[\]

`array`

▶usageMetadata{}

`object`

modelVersion

`string`

id

`string`

object

`string`

created

`number`

model

`string`

▶choices\[\]

`array`

▶usage{}

`object`

## API Schemas (Raw)

Input [ ](https://developers.cloudflare.com/ai/models/google/gemini-3.5-flash/schema-input.json "Open") [ ](https://developers.cloudflare.com/ai/models/google/gemini-3.5-flash/schema-input.json "Download") 

Output [ ](https://developers.cloudflare.com/ai/models/google/gemini-3.5-flash/schema-output.json "Open") [ ](https://developers.cloudflare.com/ai/models/google/gemini-3.5-flash/schema-output.json "Download")

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/ai/models/google/gemini-3.5-flash/#page","headline":"Gemini 3.5 Flash (Google) · Cloudflare AI docs · Cloudflare AI docs","description":"Gemini 3.5 Flash is Google's fast multimodal model with frontier intelligence, superior search, and grounding capabilities.","url":"https://developers.cloudflare.com/ai/models/google/gemini-3.5-flash/","inLanguage":"en","image":"https://developers.cloudflare.com/dev-products-preview.png","publisher":{"@type":"Organization","name":"Cloudflare","url":"https://www.cloudflare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/ai/","name":"AI"}},{"@type":"ListItem","position":3,"item":{"@id":"/ai/models/","name":"Models"}}]}
```
