The Jina AI connector lets your AI agent act in each user's Jina AI account. Each user connects their own Jina AI access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 18 tools.
- Tools
- 18
- What they doRead · write · destructive
- 15 · 2 · 115 read2 write1 destructive
- Users sign in with
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the Jina AI connection
In AgentKit > Connections, create a Jina AI connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'jinaai'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize Jina AI:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'jinaai_embedding_batches_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "jinaai"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Jina AI:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="jinaai_embedding_batches_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their Jina AI credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooljinaai_deepsearch_chatAnswer a research question with Jina DeepSearch, which searches the web, reads pages and reasons over several rounds before answering.Read-onlyDeepSearch
Answer a research question with Jina DeepSearch, which searches the web, reads pages and reasons over several rounds before answering. Returns an OpenAI-style chat completion: choices[0].message.content holds the final answer with its cited source URLs, plus usage. Use this for questions that need several searches and sources. It can take minutes; use reasoning_effort low for speed. Use jinaai_web_search for a single quick search.
Inputs
messagesarrayrequired- Conversation so far, OpenAI chat format, ending with the user's question. Each message has role (user or assistant) and content. Example: [{"role": "user", "content": "What is the latest blog post from Jina AI?"}]
bad_hostnamesarray- Domains to exclude from sources. Example: ["spam-site.example"]
boost_hostnamesarray- Domains to prefer when reading sources. Example: ["jina.ai"]
budget_tokensinteger- Maximum tokens the whole research process may use; overrides reasoning_effort. Example: 200000
max_attemptsinteger- Maximum attempts at solving the question with different strategies; overrides reasoning_effort. Example: 1
max_returned_urlsinteger- Maximum number of source URLs in the final answer. Example: 5
modelstring- DeepSearch model (default jina-deepsearch-v1). Example: jina-deepsearch-v1default
jina-deepsearch-v1 no_direct_answerboolean- Set true to force further search and reasoning steps even when the question looks trivial.
only_hostnamesarray- Only read sources from these domains. Example: ["arxiv.org"]
reasoning_effortstring- How hard DeepSearch works: low, medium (default) or high. Lower is faster and cheaper. Example: lowone of
lowmediumhigh response_formatobject- Structured output: {"type": "json_schema", "json_schema": <JSON schema>} makes the final answer match that schema. Example: {"type": "json_schema", "json_schema": {"type": "object", "properties": {"year": {"type": "number"}}}}
jinaai_document_transcribeTranscribe one document page image to text or markdown with Jina's jina-ocr-v1 model, or extract fields into a JSON schema.Read-onlyTranscribe Document Image
Transcribe one document page image to text or markdown with Jina's jina-ocr-v1 model, or extract fields into a JSON schema. Returns an OpenAI-style chat completion; choices[0].message.content holds the transcription, plus usage. Use this for a scanned page or photo you have as an image. Use jinaai_url_read with respond_with jina-ocr-v1 for a page or PDF at a URL.
Inputs
image_urlstringrequired- Page image to transcribe: a public image URL or a data URL (data:image/png;base64,...). Example: https://example.com/invoice-page-1.png
max_completion_tokensinteger- Maximum tokens in the transcription. Example: 4096
promptstring- Optional instruction sent with the image. Example: Transcribe this page as markdown.
response_formatobject- Optional structured output: {"type": "json_schema", "json_schema": {"name": "invoice", "schema": <JSON schema>}} returns the transcription as JSON matching the schema. Example: {"type": "json_schema", "json_schema": {"name": "invoice", "schema": {"type": "object", "properties": {"total": {"type": "string"}}}}}
jinaai_documents_rerankOrder a list of documents by how relevant each one is to a query, with a Jina reranker model.Read-onlyRerank Documents
Order a list of documents by how relevant each one is to a query, with a Jina reranker model. Returns results sorted by relevance, each with index (position in your list), relevance_score and, by default, the document; plus usage.total_tokens. Use this to refine search results or RAG chunks. Use jinaai_web_search to get candidates from the web first.
Inputs
documentsarrayrequired- Candidate documents to rank. Each is a string, or an object such as {"text": "..."} or, for jina-reranker-m0, {"image": "<image URL or base64>"}. Example: ["Organic skincare for sensitive skin with aloe vera", "New makeup trends focus on bold colors"]
modelstringrequired- Reranker model. jina-reranker-v3.5 is the newest multilingual text reranker; jina-reranker-m0 also ranks images. Example: jina-reranker-v3.5one of
jina-reranker-v3.5jina-reranker-v3jina-reranker-m0jina-reranker-v2-base-multilingualjina-colbert-v2 querystringrequired- Query to rank the documents against. Example: Organic skincare products for sensitive skin
return_documentsboolean- Whether each result includes the document text (default true). Set false to get only index and relevance_score.
top_ninteger- Number of top documents to return. Leave empty to return all of them, ranked. Example: 3
jinaai_embedding_batch_errors_getDownload the error lines of a Jina embedding batch job.Read-onlyGet Embedding Batch Errors
Download the error lines of a Jina embedding batch job. Returns JSONL text, one line per input line that failed, with its error. Use this when jinaai_embedding_batch_get shows stats.failed above 0.
Inputs
batch_idstringrequired- ID of the batch job, from jinaai_embedding_batch_create or jinaai_embedding_batches_list. Example: batch_abc123
jinaai_embedding_batch_getGet the status of one Jina embedding batch job.Read-onlyGet Embedding Batch
Get the status of one Jina embedding batch job. Returns batch_id, status (pending, processing, completed, failed, expired or cancelled), stats (total, completed, failed, total_tokens), output_url, error_file_url, error and timestamps. Use this to poll a job until it completes. Use jinaai_embedding_batches_list to find job IDs.
Inputs
batch_idstringrequired- ID of the batch job, from jinaai_embedding_batch_create or jinaai_embedding_batches_list. Example: batch_abc123
jinaai_embedding_batch_output_getDownload the results of a completed Jina embedding batch job.Read-onlyGet Embedding Batch Output
Download the results of a completed Jina embedding batch job. Returns the output as JSONL text, one line per input with the embedding response for that line. Use this after jinaai_embedding_batch_get shows status completed. Large jobs return very large output.
Inputs
batch_idstringrequired- ID of the batch job, from jinaai_embedding_batch_create or jinaai_embedding_batches_list. Example: batch_abc123
jinaai_embedding_batches_listList your recent Jina embedding batch jobs.Read-onlyList Embedding Batches
List your recent Jina embedding batch jobs. Returns an array of jobs, each with batch_id, status, model, stats and timestamps. Use this to find a job's ID. Use jinaai_embedding_batch_get for one job.
Inputs
limitinteger- Maximum number of jobs to return (default 20). Example: 50default
20
jinaai_embeddings_createTurn text, images or code into embedding vectors with a Jina embedding model.Read-onlyCreate Embeddings
Turn text, images or code into embedding vectors with a Jina embedding model. Returns data (one object per input with index and embedding), the model used, and usage.total_tokens. Use this for semantic search, clustering or similarity. For thousands of texts at once use jinaai_embedding_batch_create; to order search results use jinaai_documents_rerank.
Inputs
inputarrayrequired- Items to embed, one embedding per item. Each item is a string, or an object such as {"text": "..."} or {"image": "<image URL or base64>"} for multimodal models (jina-embeddings-v4, jina-clip-v2). Example: ["Organic skincare for sensitive skin", "Bio-Hautpflege für empfindliche Haut"]
modelstringrequired- Embedding model. jina-embeddings-v5-text-small (1024 dimensions, 32K context) or -nano (768 dimensions) for text; jina-embeddings-v4 or jina-clip-v2 for text and images; jina-code-embeddings-1.5b or -0.5b for code. Use jinaai_models_list for the full catalogue. Example: jina-embeddings-v5-text-smallone of
jina-embeddings-v5-text-smalljina-embeddings-v5-text-nanojina-embeddings-v5-omni-smalljina-embeddings-v5-omni-nanojina-embeddings-v4jina-embeddings-v3jina-clip-v2jina-clip-v1jina-code-embeddings-1.5bjina-code-embeddings-0.5bjina-colbert-v2jina-embeddings-v2-base-enjina-embeddings-v2-base-code dimensionsinteger- Truncate each embedding to this many dimensions (Matryoshka), up to the model's size. Example: 256
embedding_typestring- Encoding of the returned embeddings: float (default), base64, binary or ubinary. Example: floatone of
floatbase64binaryubinary late_chunkingboolean- Set true to embed all text inputs as one sequence before splitting, so each chunk keeps the context of its neighbours (jina-embeddings-v3 and v4 only).
normalizedboolean- Whether embeddings are scaled to unit length (L2-normalized). Most models default to true.
taskstring- What the embeddings are for, so the model can optimize them: retrieval.query for search queries, retrieval.passage for the documents being searched, text-matching for similarity, classification, clustering (v5), separation (v3), code.query or code.passage (v4); code models use nl2code.query, nl2code.passage, qa.query, qa.passage and similar. Example: retrieval.passage
truncateboolean- Set true to cut inputs longer than the model's context instead of returning an error.
jinaai_model_getGet one Jina model's details by ID.Read-onlyGet Model
Get one Jina model's details by ID. Returns the model's id, name, modalities, context_length, max_output_length, pricing, supported features and description. Use this when you know the model ID. Use jinaai_models_list to browse all models.
Inputs
model_idstringrequired- Model ID, in full (jina-ai/jina-embeddings-v3) or short (jina-embeddings-v3) form, from jinaai_models_list. Example: jina-embeddings-v5-text-small
jinaai_models_listList every model in Jina's catalogue.Read-onlyList Models
List every model in Jina's catalogue. Returns data, one entry per model with id, name, input and output modalities, context_length, pricing and description. Use this to pick a model for embeddings, reranking or classification. Use jinaai_model_get for one model.
Inputs
This tool takes no inputs.
jinaai_text_classifySort texts or images into categories with Jina Classifier, either zero-shot from a list of labels or with a classifier you trained.Read-onlyClassify Text or Images
Sort texts or images into categories with Jina Classifier, either zero-shot from a list of labels or with a classifier you trained. Returns data with one entry per input: index, prediction (the best label), score, and predictions (score for every label); plus usage.total_tokens. Use labels and model for zero-shot. Use classifier_id after jinaai_classifier_train for few-shot.
Inputs
inputarrayrequired- Items to classify. Each is an object: {"text": "..."} for text, or {"image": "<image URL or base64>"} for images (jina-clip-v2 or jina-embeddings-v4). Do not mix text and images in one call. Up to 1,024 items. Example: [{"text": "Write a poem about the beauty of nature."}, {"text": "Translate this sentence into French."}]
classifier_idstring- ID of a few-shot classifier trained with jinaai_classifier_train. When set, labels and model come from that classifier. Example: 918c0846-d6ae-4f34-810d-c0c7a59aee14
labelsarray- Candidate labels for zero-shot classification, up to 256. Required unless classifier_id is set. Example: ["Creative writing", "Simple task"]
modelstring- Model for zero-shot classification: jina-embeddings-v3 for text, jina-clip-v2 for images, jina-embeddings-v4 for text or images. Required unless classifier_id is set. Example: jina-embeddings-v3one of
jina-embeddings-v3jina-embeddings-v4jina-clip-v2
jinaai_text_segmentCount the tokens in a text with Jina Segmenter, and optionally split it into chunks or list its tokens.Read-onlySegment Text
Count the tokens in a text with Jina Segmenter, and optionally split it into chunks or list its tokens. Free of charge. Returns num_tokens and tokenizer, plus chunks, chunk_positions and num_chunks when return_chunks is true, and tokens when return_tokens is true. Use this to check a text's size or to chunk text from jinaai_url_read before jinaai_embeddings_create.
Inputs
contentstringrequired- Text to count tokens in or split into chunks, up to 64K characters. Example: Jina AI: Your Search Foundation, Supercharged!
headinteger- Return only the first N tokens. Cannot be combined with tail. Example: 100
max_chunk_lengthinteger- Maximum characters per chunk when return_chunks is true (default 1000); a chunk can be shorter at a natural boundary. Example: 500
return_chunksboolean- Set true to split the text into semantic chunks, returned in chunks and chunk_positions.
return_tokensboolean- Set true to also return the tokens and their IDs.
tailinteger- Return only the last N tokens. Cannot be combined with head. Example: 100
tokenizerstring- Tokenizer used for counting (default cl100k_base). Example: o200k_baseone of
cl100k_baseo200k_basep50k_baser50k_basep50k_editgpt2
jinaai_url_readFetch a web page or PDF by URL with Jina Reader and get its main content in an LLM-friendly format.Read-onlyRead URL
Fetch a web page or PDF by URL with Jina Reader and get its main content in an LLM-friendly format. Returns JSON with data.title, data.description, data.url, the page body (data.content for markdown, the default; data.text or data.html for those formats) and data.usage.tokens, plus data.links and data.images when requested. Use this when you already know the URL. Use jinaai_web_search to find pages first, and jinaai_url_screenshot for an image of the page.
Inputs
urlstringrequired- Full URL of the public web page or PDF to read, including https://. Example: https://jina.ai/news
enginestring- Engine Jina Reader uses to fetch the page: browser for the best quality on JavaScript-heavy pages, direct for speed on simple pages, cf-browser-rendering for an experimental engine aimed at JavaScript-heavy sites. Leave empty to let Jina choose. Example: browserone of
browserdirectcf-browser-rendering localestring- Browser locale used to render the page, for sites that serve different content per language. Example: de-DE
no_cacheboolean- Set true to bypass Jina's cache and fetch a fresh copy of the page.
pageinteger- Page to parse when respond_with is jina-ocr-v1, starting at 1. A multi-page document needs one call per page. Example: 2
remove_selectorstring- CSS selector for elements to strip out, such as headers, footers or navigation. Example: header, footer, nav
respond_withstring- Optional model that converts the page. readerlm-v2 converts complex HTML to markdown with a small language model. jina-ocr-v1 reads the rendered page as an image (for scanned documents, PDFs, formulas and tables), parses one page per request (see page) and costs about 40 times the tokens. Example: readerlm-v2one of
readerlm-v2jina-ocr-v1 retain_imagesstring- Set to none to remove all images from the content and save tokens. Example: noneone of
none return_formatstring- Format of the page body: markdown (default, LLM-friendly, in data.content), html (in data.html) or text (plain text, in data.text). Example: markdownone of
markdownhtmltext target_selectorstring- CSS selector for the part of the page to keep; everything else is dropped. Example: article
timeoutinteger- Maximum seconds to wait for the page to load, from 1 to 180. Example: 30
token_budgetinteger- Maximum number of tokens the request may use; the call fails if the page is larger. Example: 50000
wait_for_selectorstring- CSS selector Jina waits for before returning, for pages that load content late. Example: #main-content
with_generated_altboolean- Set true to have Jina write alt text for images that have none.
with_iframeboolean- Set true to include content from iframes on the page.
with_images_summarystring- Adds the page's images in data.images: true for unique images, all for every image. Example: trueone of
trueall with_links_summarystring- Adds the page's links in data.links: true for unique links, all for every link. Example: trueone of
trueall with_shadow_domboolean- Set true to extract content from Shadow DOM roots in the page.
jinaai_url_screenshotCapture a screenshot of a web page with Jina Reader.Read-onlyCapture URL Screenshot
Capture a screenshot of a web page with Jina Reader. Returns JSON with the page title and URL and a link to the PNG image in data.screenshotUrl (or data.pageshotUrl for a full-page capture). Use this to see how a page looks. Use jinaai_url_read to get the page's text.
Inputs
urlstringrequired- Full URL of the public web page to capture, including https://. Example: https://jina.ai
capturestring- What to capture: screenshot for the first screen (viewport) or pageshot for the full scrolling page. Example: pageshotone of
screenshotpageshotdefaultscreenshot enginestring- Engine Jina Reader uses to fetch the page: browser for the best quality on JavaScript-heavy pages, direct for speed on simple pages, cf-browser-rendering for an experimental engine aimed at JavaScript-heavy sites. Leave empty to let Jina choose. Example: browserone of
browserdirectcf-browser-rendering localestring- Browser locale used to render the page, for sites that serve different content per language. Example: de-DE
no_cacheboolean- Set true to bypass Jina's cache and fetch a fresh copy of the page.
timeoutinteger- Maximum seconds to wait for the page to load, from 1 to 180. Example: 30
wait_for_selectorstring- CSS selector Jina waits for before returning, for pages that load content late. Example: #main-content
jinaai_web_searchSearch the web with Jina Search and get the top results, each with its page content read in an LLM-friendly format.Read-onlySearch the Web
Search the web with Jina Search and get the top results, each with its page content read in an LLM-friendly format. Returns JSON with a data array; each result has title, url, description, content and usage.tokens (content is omitted when respond_with is no-content). Use this when you don't know which page has the answer. Use jinaai_url_read for a known URL, and jinaai_deepsearch_chat for a multi-step research question.
Inputs
qstringrequired- Search query. Example: When was Jina AI founded?
glstring- Two-letter country code the search runs from. Example: us
hlstring- Two-letter language code for the results. Example: en
localestring- Browser locale used to render result pages. Example: en-US
locationstring- Where the search should originate from, best given at city level. Example: San Francisco, California, United States
no_cacheboolean- Set true to bypass Jina's cache and get real-time results.
numinteger- Maximum number of results to return, up to 20. Larger values add latency. Example: 5
pageinteger- Results page to return, for pagination. Example: 2
respond_withstring- Set to no-content to return only each result's title, URL and description without fetching the pages. This is much faster and uses far fewer tokens. Example: no-contentone of
no-content retain_imagesstring- Set to none to remove all images from the content. Example: noneone of
none return_formatstring- Format of each result's content: markdown (default), html or text. Example: markdownone of
markdownhtmltext sitestring- Limit results to one website or domain. Example: https://jina.ai
timeoutinteger- Maximum seconds to wait for each result page to load. Example: 30
typestring- Kind of results: web (default), images or news. Example: newsone of
webimagesnews with_faviconsboolean- Set true to include each result's favicon.
with_images_summarystring- Adds each page's images: true for unique images, all for every image. Example: trueone of
trueall with_links_summarystring- Adds each page's links: true for unique links, all for every link. Example: trueone of
trueall
jinaai_classifier_trainCreate a few-shot Jina classifier from labelled examples, or add examples to an existing one.WriteTrain Classifier
Create a few-shot Jina classifier from labelled examples, or add examples to an existing one. Returns the classifier_id and the number of samples trained on. Use this when zero-shot labels are not accurate enough. Then call jinaai_text_classify with the classifier_id.
Inputs
inputarrayrequired- Labelled training examples. Each is an object with text (or image) and label. Labels are free names and need no meaning, up to 16 classes. Example: [{"text": "I can't log into my account after the update.", "label": "team1"}, {"text": "Please update my billing address.", "label": "team2"}]
accessstring- Who can use a new classifier: private (default, only your API key) or public (anyone with the ID, on their own quota). Example: privateone of
privatepublic classifier_idstring- ID of an existing classifier to keep training with more examples. Leave empty to create a new classifier. Example: 918c0846-d6ae-4f34-810d-c0c7a59aee14
modelstring- Embedding model the new classifier is built on. Required when creating a classifier; leave empty when updating one with classifier_id. Example: jina-embeddings-v3one of
jina-embeddings-v3jina-embeddings-v4jina-clip-v2 num_itersinteger- Training passes over these examples (default 10). Higher values weigh these examples more. Example: 10
jinaai_embedding_batch_createSubmit a large set of texts as an asynchronous Jina embedding batch job.WriteCreate Embedding Batch
Submit a large set of texts as an asynchronous Jina embedding batch job. Returns the job's batch_id, status (pending at first), model and created_at. Use this for thousands of texts. Poll with jinaai_embedding_batch_get, then read results with jinaai_embedding_batch_output_get. Use jinaai_embeddings_create for a few texts now.
Inputs
modelstringrequired- Embedding model for the batch. Example: jina-embeddings-v5-text-smallone of
jina-embeddings-v5-text-smalljina-embeddings-v5-text-nano dimensionsinteger- Truncate each embedding to this many dimensions, 1 to 1024. Example: 256
inputarray- Inline input lines for smaller batches (up to 10,000). Each line is an object with a custom_id and the text under body.input, not a bare {input: text}. Provide input or input_url. Example: [{"custom_id": "doc-1", "body": {"input": "First document text"}}, {"custom_id": "doc-2", "body": {"input": "Second document text"}}]
input_urlstring- URL of a JSONL input file (GCS, S3 or HTTP), one {"custom_id": "doc-1", "body": {"input": "text"}} object per line. Provide input or input_url. Example: gs://my-bucket/docs.jsonl
normalizedboolean- Whether embeddings are L2-normalized (default true).
taskstring- What the embeddings are for (default text-matching). Example: retrieval.passageone of
retrieval.queryretrieval.passagetext-matchingclassificationclustering webhook_urlstring- URL Jina POSTs to when the job completes. Example: https://example.com/hooks/jina-batch
jinaai_embedding_batch_cancelCancel a pending or processing Jina embedding batch job.DestructiveCancel Embedding Batch
Cancel a pending or processing Jina embedding batch job. Returns the job with its updated status. Use this to stop a job you no longer need. Completed jobs cannot be cancelled.
- Idempotent
Inputs
batch_idstringrequired- ID of the batch job, from jinaai_embedding_batch_create or jinaai_embedding_batches_list. Example: batch_abc123
No tools match.