Segmenter

長いテキストをチャンクに分割し、トークナイズするための無料 API。

セグメンタ API

Segmenter API は、LLM がコンテキスト制限内で入力を管理し、モデルのパフォーマンスを最適化するために不可欠です。開発者はトークンをカウントし、関連するテキストセグメントを抽出できるため、効率的なデータ処理とコスト管理が可能になります。


GET リクエストを使用してトークン数をカウントする

その他の機能については POST リクエストを使用してください

リクエスト
POST
curl "https://api.jina.ai/v1/segment" \
-H "Content-Type: application/json" \
-d @- <<EOFEOF
{ "content": "Jina AI: Your Search Foundation, Supercharged! 🚀\nIhrer Suchgrundlage, aufgeladen! 🚀\n您的搜索底座,从此不同!🚀\n検索ベース,もう二度と同じことはありません!🚀" }
EOFEOF


セグメンタとは何ですか?

セグメンターは、テキストをトークンやチャンクに変換する重要なコンポーネントです。トークンやチャンクは、Embeddings/Reranker モデルや LLM が処理する基本的なデータ単位です。トークンは、単語全体、単語の一部、または個々の文字を表すことができます。

長いドキュメントを超高速でチャンクに分割!

Segmenter API を使って長いドキュメントを小さなチャンクに分割し、Embeddings や Reranker で処理しやすくすることもできます。共通の構造的な手がかりと、Markdown、HTML、LaTeX、CJK 言語など、さまざまなコンテンツタイプで良好に機能するルールやヒューリスティックを活用しています。
各チャンクの最大長: 1000
各ブロック内の最大文字数。実際、テキスト内に自然な境界がある場合、ブロックの長さはこの値よりも小さくなる可能性があります。

合計チャンク数 0


Segmenter API は無料です!

API キーを提供すると、より高いレート制限にアクセスでき、キーは請求されません。
レート制限
レート制限は 2 つの方法で追跡されます:RPM (1 分あたりのリクエスト数) および TPM (1 分あたりのトークン数)。制限は IP/API キーごとに適用され、RPM または TPM のしきい値のいずれかに先に達した時点でトリガーされます。リクエストヘッダーに API キーを指定すると、IP アドレスではなくキー単位でレート制限が追跡されます。
ProductAPI EndpointDescriptionw/o API Keyw/ Free API Keyw/ Paid API Keyw/ Premium API KeyAverage latencyToken Usage CountingAllowed Request
Reader APIhttps://r.jina.aiConverts a URL to LLM-friendly text20 RPM500 RPM500 RPM5000 RPM7.9sCount the number of tokens in the output response.GET/POST
Reader APIhttps://s.jina.aiSearch the web and convert results to LLM-friendly text100 RPM100 RPM1000 RPM2.5sEvery request costs a fixed number of tokens, starting from 10,000 tokensGET/POST
Embedding APIhttps://api.jina.ai/v1/embeddingsConvert text/images to fixed-length vectors100 RPM & 100,000 TPM500 RPM & 2,000,000 TPM5,000 RPM & 50,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
Reranker APIhttps://api.jina.ai/v1/rerankRank documents by query100 RPM & 100,000 TPM500 RPM & 2,000,000 TPM5,000 RPM & 50,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
レート制限
レート制限は 2 つの方法で追跡されます:RPM (1 分あたりのリクエスト数) および TPM (1 分あたりのトークン数)。制限は IP/API キーごとに適用され、RPM または TPM のしきい値のいずれかに先に達した時点でトリガーされます。リクエストヘッダーに API キーを指定すると、IP アドレスではなくキー単位でレート制限が追跡されます。
ProductAPI EndpointDescriptionw/o API Keyw/ Free API Keyw/ Paid API Keyw/ Premium API KeyAverage latencyToken Usage CountingAllowed Request
Reader APIhttps://r.jina.aiConverts a URL to LLM-friendly text20 RPM500 RPM500 RPM5000 RPM7.9sCount the number of tokens in the output response.GET/POST
Reader APIhttps://s.jina.aiSearch the web and convert results to LLM-friendly text100 RPM100 RPM1000 RPM2.5sEvery request costs a fixed number of tokens, starting from 10,000 tokensGET/POST
Embedding APIhttps://api.jina.ai/v1/embeddingsConvert text/images to fixed-length vectors100 RPM & 100,000 TPM500 RPM & 2,000,000 TPM5,000 RPM & 50,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
Reranker APIhttps://api.jina.ai/v1/rerankRank documents by query100 RPM & 100,000 TPM500 RPM & 2,000,000 TPM5,000 RPM & 50,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
請求に関するよくある質問