KosmoKrator

ai

Jina AI CLI for AI Agents

Use the Jina AI CLI from KosmoKrator to call Jina AI tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

5 functions 5 read 0 write API key auth

Jina AI CLI Setup

Jina AI can be configured headlessly with `kosmokrator integrations:configure jinaai`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure jinaai --set api_key="$JINAAI_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor jinaai --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key JINAAI_API_KEY Secret secret yes API Key
url JINAAI_URL URL url no API Base URL

Call Jina AI Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call jinaai.jinaai_search '{
  "q": "example_q"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:jinaai jinaai_search '{
  "q": "example_q"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs jinaai --json
kosmo integrations:docs jinaai.jinaai_search --json
kosmo integrations:schema jinaai.jinaai_search --json
kosmo integrations:search "Jina AI" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Jina AI.

jinaai.jinaai_read

Read read

Read and extract clean content from a URL using Jina AI Reader. Returns the main text content of a web page, stripping away navigation, ads, and other clutter. Useful for reading articles, documentation, or any web page.

Parameters
url

Generic CLI call

kosmo integrations:call jinaai.jinaai_read '{"url":"example_url"}' --json

Provider shortcut

kosmo integrations:jinaai jinaai_read '{"url":"example_url"}' --json

jinaai.jinaai_ground

Read read

Ground a statement against provided context using Jina AI. Verifies whether a claim or statement is supported by the given reference text. Returns grounding results indicating which parts of the statement are supported or contradicted.

Parameters
statement, context

Generic CLI call

kosmo integrations:call jinaai.jinaai_ground '{"statement":"example_statement","context":"example_context"}' --json

Provider shortcut

kosmo integrations:jinaai jinaai_ground '{"statement":"example_statement","context":"example_context"}' --json

jinaai.jinaai_embeddings

Read read

Generate text embeddings using Jina AI. Converts text into dense vector representations useful for semantic search, similarity comparison, clustering, and retrieval-augmented generation (RAG).

Parameters
input, model

Generic CLI call

kosmo integrations:call jinaai.jinaai_embeddings '{"input":"example_input","model":"example_model"}' --json

Provider shortcut

kosmo integrations:jinaai jinaai_embeddings '{"input":"example_input","model":"example_model"}' --json

jinaai.jinaai_rerank

Read read

Rerank documents by relevance to a query using Jina AI. Takes a query and a list of text documents, then returns them sorted by relevance with scores. Useful for improving search results or filtering the most relevant content.

Parameters
query, documents, model, top_n

Generic CLI call

kosmo integrations:call jinaai.jinaai_rerank '{"query":"example_query","documents":"example_documents","model":"example_model","top_n":1}' --json

Provider shortcut

kosmo integrations:jinaai jinaai_rerank '{"query":"example_query","documents":"example_documents","model":"example_model","top_n":1}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

jinaai.jinaai_read

Read and extract clean content from a URL using Jina AI Reader. Returns the main text content of a web page, stripping away navigation, ads, and other clutter. Useful for reading articles, documentation, or any web page.

Operation
Read read
Schema command
kosmo integrations:schema jinaai.jinaai_read --json
ParameterTypeRequiredDescription
url string yes The URL to read and extract content from.

jinaai.jinaai_ground

Ground a statement against provided context using Jina AI. Verifies whether a claim or statement is supported by the given reference text. Returns grounding results indicating which parts of the statement are supported or contradicted.

Operation
Read read
Schema command
kosmo integrations:schema jinaai.jinaai_ground --json
ParameterTypeRequiredDescription
statement string yes The statement or claim to verify.
context string yes The reference context text to ground the statement against.

jinaai.jinaai_embeddings

Generate text embeddings using Jina AI. Converts text into dense vector representations useful for semantic search, similarity comparison, clustering, and retrieval-augmented generation (RAG).

Operation
Read read
Schema command
kosmo integrations:schema jinaai.jinaai_embeddings --json
ParameterTypeRequiredDescription
input array yes An array of strings to generate embeddings for. Each string is embedded independently.
model string no The embedding model to use (e.g., "jina-embeddings-v3"). Defaults to the Jina AI default model.

jinaai.jinaai_rerank

Rerank documents by relevance to a query using Jina AI. Takes a query and a list of text documents, then returns them sorted by relevance with scores. Useful for improving search results or filtering the most relevant content.

Operation
Read read
Schema command
kosmo integrations:schema jinaai.jinaai_rerank --json
ParameterTypeRequiredDescription
query string yes The query to rank documents against.
documents array yes An array of document strings to rank by relevance to the query.
model string no The reranking model to use (e.g., "jina-reranker-v2-base-multilingual"). Defaults to the Jina AI default model.
top_n integer no Maximum number of top results to return. Defaults to all documents.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.