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

# URL Context

URL Context lets models access and analyze a web page's text, images, and other media to answer questions about it. Include the URL in your prompt.

### Gemini/DeepSeek

Set `enable_url_context` to `true` in a Chat API request to enable URL Context:

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gemini-3.8-flash",
    "messages": [
        {
            "role": "user",
            "content": "Read this page, explain URL Context, and list the Gemini models that currently support it: https://ai.google.dev/gemini-api/docs/url-context"
        }
    ],
    "enable_url_context": true
}'
```

```bash python theme={null}
# Install the OpenAI SDK first: `pip3 install openai`

from openai import OpenAI

client = OpenAI(api_key="$GEEKAI_API_KEY", base_url="https://geekai.co/api/v1")

response = client.chat.completions.create(
    model="gemini-3.8-flash",
    messages=[
        {
            "role": "user",
            "content": "Read this page, explain URL Context, and list the Gemini models that currently support it: https://ai.google.dev/gemini-api/docs/url-context",
        },
    ],
    enable_url_context=True
)

print(response.choices[0].message.content)
```

```bash javascript theme={null}
// Install the OpenAI SDK first: `npm install openai`

import OpenAI from "openai";

const openai = new OpenAI({
    baseURL: 'https://geekai.co/api/v1',
    apiKey: '$GEEKAI_API_KEY'
});

async function main() {
    const completion = await openai.chat.completions.create({
        model: "gemini-3.8-flash",
        messages: [
          { role: "user", content: "Read this page, explain URL Context, and list the Gemini models that currently support it: https://ai.google.dev/gemini-api/docs/url-context" }],
        enable_url_context: true
    });

    console.log(completion.choices[0].message.content);
}

main();
```

```bash go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	requestBody := map[string]interface{}{
		"model": "gemini-3.8-flash",
		"messages": []interface{}{
            map[string]interface{}{
                "role": "user",
                "content": "Read this page, explain URL Context, and list the Gemini models that currently support it: https://ai.google.dev/gemini-api/docs/url-context",
            },
        },
        "enable_url_context": true,
	}

	jsonData, err := json.Marshal(requestBody)
	if err != nil {
		panic(err)
	}

	client := &http.Client{}
	req, err := http.NewRequest("POST", "https://geekai.co/api/v1/chat/completions", bytes.NewBuffer(jsonData))
	if err != nil {
		panic(err)
	}

	req.Header.Set("Authorization", "Bearer $GEEKAI_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(body))
}
```

This experimental feature is free. It is available only on GeekAI's official direct proxy channel, not on discounted channels.

Only the models listed below support this experimental feature. You can analyze up to 20 URLs per request:

* `gemini-4-carbon`
* `gemini-4-argon`
* `gemini-3.8-flash`
* `gemini-3.6-flash`
* `gemini-3.5-flash-lite`
* `gemini-3.5-flash`
* `gemini-3.1-pro-preview`
* `gemini-3.1-pro-preview:fast-thinking`
* `gemini-3-flash-preview`
* `gemini-3-flash-preview:no-thinking`
* `gemini-2.5-pro`
* `gemini-2.5-pro:fast-thinking`
* `gemini-2.5-flash`
* `gemini-2.5-flash:no-thinking`
* `gemini-2.5-flash-lite`
* `gemini-2.5-flash-lite:no-thinking`
* `deepseek-flash`
* `deepseek-v4-pro`
* `qwen4-max`
* `qwen3.8-max`
* `qwen3.8-flash`
* `qwen3.7-max`
* `qwen3.7-flash`
* `qwen3.7-plus`
* `qwen3.6-plus`
* `qwen3.6-flash`
* `qwen3.5-plus`
* `qwen3.5-flash`

> [!NOTE]
>
> For Qwen models, use tool calling with the Responses or Messages API. The Responses tool type is `web_extractor`; the Messages tool type is `web_fetch`.

You can enable [web search](https://docs.geekai.co/en/docs/chat/web_search.md) alongside URL Context to use both search results and page contents.

### Qwen

```bash Response API theme={null}
curl --location --request POST 'https://geekai.co/api/v1/responses' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "qwen4-max",
    "input": "Visit the GeekAI API integration guide and summarize its main points.",
    "tools": [
        {"type": "web_search"},
        {"type": "web_extractor"}
    ]
}'
```

```bash Message API theme={null}
curl --location --request POST 'https://geekai.co/api/v1/messages' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "qwen4-max",
    "max_tokens": 4096,
    "messages": [
        {
            "role": "user",
            "content": "Visit the GeekAI API integration guide and summarize its main points."
        }
    ],
    "tools": [
        {"type": "web_search_20250305", "name": "web_search", "max_uses": 5},
        {"type": "web_fetch_20250910", "name": "web_fetch", "max_uses": 5}
    ]
}'
```

### Call the web fetch endpoint

For finer control over page retrieval, use the standalone [web fetch endpoint](https://docs.geekai.co/en/api/web_fetch.md):

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/web_fetch' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "deepseek-reader",
    "query": "https://geekai.co"
}'
```

Read the fetched content from the `result.content` response field:

```json theme={null}
{
    ...
    "result": {
        "url": "https://geekai.co",
        "title": "GeekAI - Unified AI Model Routing for Enterprises",
        "content": "..."
    }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.