> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.auxiliar.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.auxiliar.ai/_mcp/server.

# Jina

Proxies [Jina](https://jina.ai)'s Search Foundation APIs. These are several products under **one** key, spread across **several** hosts. The gateway maps each product to its host by the sub-prefix after `/jina`:

```
GET|POST /jina/<service>/<path>   → <service host>/<path>
```

`GET` and `POST` — the methods these products document (the Reader/Search GET form carries the target URL and params in the path/query; the model APIs `POST` a JSON body).

## Services

The gateway accepts exactly this whitelist; any other `/jina/<service>` returns the gateway's `404` without reaching Jina.

| Service      | Upstream host                       | Purpose                           |
| ------------ | ----------------------------------- | --------------------------------- |
| `reader`     | `https://r.jina.ai`                 | Read a URL as clean markdown/text |
| `search`     | `https://s.jina.ai`                 | Web search                        |
| `embeddings` | `https://api.jina.ai/v1/embeddings` | Text/image embeddings             |
| `rerank`     | `https://api.jina.ai/v1/rerank`     | Rerank documents                  |
| `classify`   | `https://api.jina.ai/v1/classify`   | Zero-shot classification          |

The path after `/jina/<service>` is forwarded verbatim — e.g. `/jina/reader/https://example.com` → `https://r.jina.ai/https://example.com`.

## What the gateway injects and strips

Jina authenticates with the `Authorization: Bearer` header — the **same** header you use for your gateway token. So the gateway **overwrites** it with the injected Jina key:

* **The `Authorization` header is overwritten** with the secret Jina key. Your gateway token is consumed by the gateway and never reaches Jina.
* Jina has no query-param spelling of the key, so nothing is dropped from the query string.

## Examples

```bash
curl "$GATEWAY/jina/reader/https://example.com" \
  -H "Authorization: Bearer $TOKEN"
```

```bash
curl -X POST "$GATEWAY/jina/embeddings" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model": "jina-embeddings-v3", "input": ["hello world"]}'
```

```bash
curl "$GATEWAY/jina/search/cloudflare+workers" \
  -H "Authorization: Bearer $TOKEN"
```

The response is Jina's JSON (or, for Reader/Search, markdown/text), returned unchanged. For request and response fields, follow [Jina's documentation](https://docs.jina.ai) — the gateway does not alter them.