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

# Jina AI Integration for AI Agents & Workflows

> AI-powered search foundation with embeddings, reranking, web reading, search, deep research, text segmentation, and zero-shot classification capabilities.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img className="block dark:hidden" src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/jina-ai-light.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=84c05d5d0767fe6b5d588f14034f766b" alt="Jina AI logo" width="72" height="72" data-path="logos/jina-ai-light.svg" />

<img className="hidden dark:block" src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/jina-ai-dark.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=9818df1a6fa7b4d0a32cfdfbec606d45" alt="Jina AI logo" width="72" height="72" data-path="logos/jina-ai-dark.svg" />

## Overview

Add **Jina AI** to any ModuleX agent or workflow. AI-powered search foundation tools against Jina AI's REST surfaces: embeddings, rerank, web reader, web search, deep search, text segmentation, and zero-shot classification. Each capability lives on a different subdomain — the tool code routes to the correct one per action.

<Info>
  **Categories**: Web Search & Scraping · Ai · Embeddings · Nlp · Research · **Auth**: API Key, ModuleX Managed Key · **Actions**: 7
</Info>

## Authentication

<Tabs>
  <Tab title="API Key">
    ### API Key Authentication

    Authenticate using your Jina AI API key. Get your free API key at [https://jina.ai/?sui=apikey](https://jina.ai/?sui=apikey)

    #### Required Credentials

    | Field           | Description                                                                                                              | Required | Format                              |
    | --------------- | ------------------------------------------------------------------------------------------------------------------------ | -------- | ----------------------------------- |
    | Jina AI API Key | Your Jina AI API key for authentication. Get your free key at [https://jina.ai/?sui=apikey](https://jina.ai/?sui=apikey) | Yes      | `jina_xxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
  </Tab>

  <Tab title="ModuleX Managed Key">
    ### ModuleX Managed Key

    Use ModuleX's managed API keys with usage tracked against your weekly credit limit
  </Tab>
</Tabs>

## Available Actions

<AccordionGroup>
  <Accordion title="generate_embeddings — Generate embeddings for text or images. Converts inputs to fixed-length vectors for semantic search, similarity matching, clustering, and RAG applications.">
    ### Parameters

    <ResponseField name="input" type="array" required>
      Array of input strings or objects with 'text', 'image', or 'pdf' keys
    </ResponseField>

    <ResponseField name="model" type="string">
      Embedding model to use (Default: `jina-embeddings-v3`)
    </ResponseField>

    <ResponseField name="task" type="string">
      Task optimization type
    </ResponseField>

    <ResponseField name="dimensions" type="integer">
      Truncate embeddings to specified size
    </ResponseField>

    <ResponseField name="late_chunking" type="boolean">
      Enable late chunking mode (Default: `false`)
    </ResponseField>

    <ResponseField name="truncate" type="boolean">
      Auto-truncate content beyond max length (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "GenerateEmbeddingsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="rerank_documents — Re-rank documents by relevance to a query. Improves search result relevance for RAG and search applications.">
    ### Parameters

    <ResponseField name="query" type="string" required>
      Search query to rank documents against
    </ResponseField>

    <ResponseField name="documents" type="array" required>
      Documents to rerank (strings or objects)
    </ResponseField>

    <ResponseField name="model" type="string">
      Reranker model to use (Default: `jina-reranker-v2-base-multilingual`)
    </ResponseField>

    <ResponseField name="top_n" type="integer">
      Number of top results to return
    </ResponseField>

    <ResponseField name="return_documents" type="boolean">
      Include document text in response (Default: `true`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "RerankDocumentsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="read_webpage — Read and parse web content in LLM-friendly format. Extracts structured content from web pages optimized for AI processing.">
    ### Parameters

    <ResponseField name="url" type="string" required>
      The URL to read and parse
    </ResponseField>

    <ResponseField name="return_format" type="string">
      Output format (Default: `markdown`)
    </ResponseField>

    <ResponseField name="target_selector" type="string">
      CSS selectors to focus on specific elements
    </ResponseField>

    <ResponseField name="remove_selector" type="string">
      CSS selectors to exclude from page
    </ResponseField>

    <ResponseField name="wait_for_selector" type="string">
      CSS selectors to wait for before returning
    </ResponseField>

    <ResponseField name="with_links_summary" type="boolean">
      Gather all links at the end of response (Default: `false`)
    </ResponseField>

    <ResponseField name="with_images_summary" type="boolean">
      Gather all images at the end of response (Default: `false`)
    </ResponseField>

    <ResponseField name="timeout" type="integer">
      Maximum time in seconds to wait for webpage to load
    </ResponseField>

    <ResponseField name="no_cache" type="boolean">
      Bypass cache for fresh retrieval (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Title"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        },
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Content"
        },
        "links": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Links"
        },
        "images": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Images"
        },
        "usage": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Usage"
        }
      },
      "required": [
        "success"
      ],
      "title": "ReadWebpageOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="web_search — Search the web with LLM-optimized results. Returns search results in formats optimized for AI and enterprise search.">
    ### Parameters

    <ResponseField name="query" type="string" required>
      The search query to execute
    </ResponseField>

    <ResponseField name="site" type="string">
      Limit search to specific domain (e.g. 'github.com')
    </ResponseField>

    <ResponseField name="return_format" type="string">
      Output format (Default: `markdown`)
    </ResponseField>

    <ResponseField name="num" type="integer">
      Maximum number of results to return
    </ResponseField>

    <ResponseField name="gl" type="string">
      Two-letter country code for localized results
    </ResponseField>

    <ResponseField name="hl" type="string">
      Two-letter language code for search
    </ResponseField>

    <ResponseField name="with_links_summary" type="boolean">
      Include links summary (Default: `false`)
    </ResponseField>

    <ResponseField name="with_images_summary" type="boolean">
      Include images summary (Default: `false`)
    </ResponseField>

    <ResponseField name="no_cache" type="boolean">
      Bypass cache for real-time data (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        },
        "results": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Results",
          "type": "array"
        },
        "count": {
          "default": 0,
          "title": "Count",
          "type": "integer"
        }
      },
      "required": [
        "success"
      ],
      "title": "WebSearchOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="deep_search — Perform comprehensive research combining web searching, reading, and reasoning. Acts as a research agent for thorough investigation.">
    ### Parameters

    <ResponseField name="query" type="string" required>
      Research query or question to investigate
    </ResponseField>

    <ResponseField name="reasoning_effort" type="string">
      Reasoning effort level (low, medium, high) (Default: `medium`)
    </ResponseField>

    <ResponseField name="budget_tokens" type="integer">
      Maximum tokens for the process (overrides reasoning\_effort)
    </ResponseField>

    <ResponseField name="max_attempts" type="integer">
      Maximum retries for problem solving
    </ResponseField>

    <ResponseField name="no_direct_answer" type="boolean">
      Force deeper search even for simple queries (Default: `false`)
    </ResponseField>

    <ResponseField name="max_returned_urls" type="integer">
      Maximum URLs in final answer
    </ResponseField>

    <ResponseField name="boost_hostnames" type="array">
      Domains to prioritize for content retrieval
    </ResponseField>

    <ResponseField name="bad_hostnames" type="array">
      Domains to exclude from content retrieval
    </ResponseField>

    <ResponseField name="only_hostnames" type="array">
      Only retrieve content from these domains
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        }
      },
      "required": [
        "success"
      ],
      "title": "DeepSearchOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="segment_text — Tokenize and segment text into chunks. Useful for counting tokens and preparing text for embedding in RAG applications.">
    ### Parameters

    <ResponseField name="content" type="string" required>
      Text content to segment
    </ResponseField>

    <ResponseField name="tokenizer" type="string">
      Tokenizer to use (Default: `cl100k_base`)
    </ResponseField>

    <ResponseField name="return_tokens" type="boolean">
      Include tokens and IDs in response (Default: `false`)
    </ResponseField>

    <ResponseField name="return_chunks" type="boolean">
      Segment into semantic chunks (Default: `true`)
    </ResponseField>

    <ResponseField name="max_chunk_length" type="integer">
      Maximum characters per chunk (Default: `1000`)
    </ResponseField>

    <ResponseField name="head" type="integer">
      Return only first N tokens (exclusive with tail)
    </ResponseField>

    <ResponseField name="tail" type="integer">
      Return only last N tokens (exclusive with head)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        },
        "num_tokens": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Num Tokens"
        },
        "num_chunks": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Num Chunks"
        },
        "chunks": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Chunks"
        },
        "chunk_positions": {
          "anyOf": [
            {
              "items": {
                "items": {
                  "type": "integer"
                },
                "type": "array"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Chunk Positions"
        },
        "tokens": {
          "anyOf": [
            {
              "items": {},
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tokens"
        },
        "tokenizer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Tokenizer"
        },
        "usage": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Usage"
        }
      },
      "required": [
        "success"
      ],
      "title": "SegmentTextOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="classify — Zero-shot classification for text or images. Classifies content into provided categories without training.">
    ### Parameters

    <ResponseField name="input" type="array" required>
      Array of texts or image objects to classify
    </ResponseField>

    <ResponseField name="labels" type="array" required>
      List of classification categories
    </ResponseField>

    <ResponseField name="model" type="string">
      Classification model (Default: `jina-embeddings-v3`)
    </ResponseField>

    <ResponseField name="classifier_id" type="string">
      Existing classifier ID to reuse
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Data"
        },
        "classifications": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Classifications",
          "type": "array"
        },
        "usage": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Usage"
        }
      },
      "required": [
        "success"
      ],
      "title": "ClassifyOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* Per-endpoint subdomains:
  `api.jina.ai/v1/embeddings`, `api.jina.ai/v1/rerank`,
  `r.jina.ai/`, `s.jina.ai/`,
  `deepsearch.jina.ai/v1/chat/completions`,
  `segment.jina.ai/`, `api.jina.ai/v1/classify`.
* Reader and Search expect their configuration via `X-*` request
  headers (return format, target selectors, cache bypass, etc.) —
  preserved verbatim from the legacy implementation.
* Deep search timeout is 300s (the API genuinely takes that long for
  high-effort queries); reader/search use 120s; everything else uses
  60s.
* Standard plan rate limits (from the legacy JSON's `rate_limits`
  block): embeddings/rerank 500 RPM, reader 200 RPM, search 40 RPM,
  classify 20 RPM, segment 200 RPM. Premium is 4-10× higher.

## Related integrations

<CardGroup cols={3}>
  <Card title="Tavily Search" href="/integrations/tools/tavily" />

  <Card title="Ahrefs" href="/integrations/tools/ahrefs" />

  <Card title="Airweave" href="/integrations/tools/airweave" />
</CardGroup>

## Links

* [Jina AI](https://jina.ai)
