- 语言大模型
- 迁移API指南
- 模型信息
- 联网搜索
- 深度搜索
- 图片分析
- 推理模式
- 链接解析
- 长期记忆(Beta)
- 简化版API
- OpenAI
- Anthropic
- Gemini
- 国产模型
- 硅基流动
- 开源模型
- Chat(LLaMA3.3)
- Chat(LLaMA3.2多模态)
- Chat(LLaMA3.1)
- Chat(Mixtral-8x7B)
- Chat(Mistral-Large-2411)
- Chat(Mistral-small-2503)
- Chat(Pixtral-Large-2411多模态)
- Chat(Gemma-7B、Gemma-3-27b-it)
- Chat(Gemma2-9B)
- Chat(Command R+)
- Chat(Qwen2)
- Chat(Qwen2.5)
- Chat(Qwen2.5-VL)
- Chat(Llama-3.1-nemotron)
- Chat(QwQ-32B、QwQ-Plus、QwQ-32B-Preview)
- 专业模型
- 其他模型
- 图片生成
- DALL.E
- Stability.ai
- Midjourney
- Midjourney-Relax
- 302.AI
- SDXL(图片生成)
- SDXL-Lora(图片生成-Lora)
- SDXL-Lightning(快速图片生成)
- SDXL-Lightning-V2(快速图片生成V2)
- SDXL-Lightning-V3(快速图片生成V3)
- SD3(图片生成-SD3)
- SD3(图片生成-SD3-v2)
- Aura-Flow(图片生成)
- Kolors(图片生成-可灵)
- Kolors(参考图片生成-可灵)
- QRCode(艺术二维码生成)
- Lora(图片生成-Lora)
- SD-3.5-Large(图片生成)
- SD-3.5-Large-Turbo(图片生成)
- SD-3.5-Medium(图片生成)
- Lumina-Image-V2(图片生成)
- Playground-v25(图片生成)
- Omnigen-V1(图片生成)
- Glif
- Flux
- Ideogram
- Recraft
- Luma
- Doubao
- Google
- Minimax海螺
- 智谱
- 图片处理
- 302.AI
- Upscale(图片放大)
- Upscale-V2(图片放大V2)
- Upscale-V3(图片放大V3)
- Upscale-V4(图片放大V4)
- Super-Upscale(超 级图片放大)
- Super-Upscale-V2(超级图片放大V2)
- Face-upscale(人像照片放大)
- Colorize(黑白照片上色)
- Colorize(黑白照片上色V2)
- Removebg(背景消除)
- Removebg-V2(背景消除V2)
- Inpaint(图片修改)
- Erase(物体消除)
- Face-to-many(人像照片风格化)
- Llava(图像识别)
- Relight(二次打光)
- Relight-background(二次打光背景合成)
- Relight-V2(二次打光-V2)
- Face-swap-V2(AI换脸V2)
- Fetch(获取任务结果)
- HtmltoPng(HTML转PNG格式)
- SvgToPng(SVG转PNG格式)
- image-translate(图片翻译)
- image-translate-query(图片翻译结果)
- image-translate-redo(图片翻译修改)
- Flux-selfie(自拍照片风格化)
- Trellis(图片转3D模型)
- Pose-Transfer(人物姿态变换)
- Pose-Transfer(人物姿态变换结果)
- Virtual-Tryon(虚拟穿衣)
- Virtual-Tryon(虚拟穿衣结果)
- Denoise(AI降噪)
- Deblur(AI去模糊)
- 302.AI-ComfyUI
- Vectorizer
- Stability.ai
- Fast Upscale(快速图片放大)
- Creative Upscale(创意图片放大)
- Conservative Upscale(保守图片放大)
- Fetch Creative Upscale(超级图片放大)
- Erase(物体消除)
- Inpaint(图片修改)
- Outpaint(图片扩展)
- Search-and-replace(内容替换)
- Search-and-recolor(内容重着色)
- Remove-background(背景消除)
- Sketch(草图转图片)
- Structure(以图生图)
- Style(风格一致性)
- Replace-Background(更换背景)
- Stable-Fast-3D(图片转3D模型)
- Stable-Point-3D(图片转3D模型新版)
- Glif
- Clipdrop
- Recraft
- BRIA
- Remove Background(背景消除)
- Blur Background(背景模糊)
- Generate Background(背景生成)
- Erase Foreground(擦除前景)
- Eraser(物体擦除)
- Expand Image(图片扩展)
- Increase Resolution(图片放大)
- Crop(图片裁切)
- Cutout(产品图裁剪)
- Packshot(产品图特写)
- Shadow (产品图阴影)
- Scene (产品图场景生成)
- Caption(图片描述)
- Register(图片上传)
- Mask(图片分割)
- Presenter info (人脸分析)
- Modify Presenter(人脸修改)
- Delayer Image(图片转PSD)
- Flux
- Hyper3D
- Tripo3D
- FASHN
- Ideogram
- Doubao
- Kling可灵
- 302.AI
- 视频生成
- 统一接口
- 302.AI
- Stable Diffusion
- Luma AI
- Runway Gen-3
- Kling可灵
- Txt2Video(文生视频1.0-快速-5秒)
- Image2Video(图生视频1.0-快速-5秒)
- Image2Video(图生视频1.0-快速-10秒)
- Txt2Video_HQ(文生视频1.5-高清-5秒)
- Txt2Video_HQ(文生视频1.5-高清-10秒)
- Image2Video(图生视频1.5-快速-5秒)
- Image2Video(图生视频1.5-快速-10秒)
- Image2Video_HQ(图生视频1.5-高清-5秒)
- Image2Video_HQ(图生视频1.5-高清-10秒)
- Txt2Video(文生视频1.6-标准-5秒)
- Txt2Video(文生视频1.6-标准-10秒)
- Txt2Video(文生视频1.6-高清-5秒)
- Txt2Video(文生视频1.6-高清-10秒)
- Image2Video(图生视频1.6-标准-5秒)
- Image2Video(图生视频1.6-标准-10秒)
- Image2Video(图生视频1.6-高清-5秒)
- Image2Video(图生视频1.6-高清-10秒)
- Image2Video(多图参考)
- Extend_Video(视频扩展)
- Fetch(获取任务结果)
- CogVideoX智谱
- Minimax海螺
- Pika
- PixVerse
- Genmo
- Hedra
- Haiper
- Sync.
- Lightricks
- Hunyuan混元
- Vidu
- 通义万相
- 即梦
- 硅基流动
- 昆仑万维
- 音视频处理
- 信息处理
- 302.AI
- 管理后台
- 信息搜索
- Xiaohongshu_Search(小红书搜索笔记)
- Xiaohongshu_Note(小红书获取笔记)
- Tiktok_Search(Tiktok搜索视频)
- Douyin_Search(抖音搜索视频)
- Twitter_Search(X搜索内容)
- Twitter_Post(X获取用户帖子)
- Twitter_User(X获取用户信息)
- Weibo_Post(微博获取用户帖子)
- Search_Video(Youtube搜索视频)
- Youtube_Info(Youtube获取视频信息)
- Youtube_Subtitles(Youtube获取字幕)
- Bilibili_Info(B站获取视频信息)
- MP_Article_List(获取微信公众号文章列表)
- MP_Article(获取微信公众号文章)
- 文件处理
- 代码运行
- Tavily
- SearchAPI
- Search1API
- Exa
- 博查AI
- Doc2x
- Glif
- Jina
- DeepL
- RSSHub
- 流光卡片
- 有道
- Mistral
- 302.AI
- RAG相关
- OpenAI
- Jina
- 国产模型
- 302.AI
- 工具API
- 帮助中心
Tokenizer(文本切片)
正式环境
正式环境
POST
https://api.302.ai/jina/tokenizer
可用于RAG时将文本进行语义切片
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
content
string
必需
return_tokens
string
必需
return_chunks
string
必需
max_chunk_length
integer
可选
示例
{
"content": " CHAPTER I Down the Rabbit-Hole Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, `and what is the use of a book,' thought Alice `without pictures or conversation?' So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her. There was nothing so very remarkable in that; nor did Alice think it so very much out of the way to hear the Rabbit say to itself, `Oh dear! Oh dear! I shall be late!' (when she thought it over afterwards, it occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but when the Rabbit actually took a watch out of its waistcoat-pocket, and looked at it, and then hurried on, Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either a waistcoat-pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after it, and fortunately was just in time to see it pop down a large rabbit-hole under the hedge. White Rabbit checking watch In another moment down went Alice after it, never once considering how in the world she was to get out again. The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well. Either the well was very deep, or she fell very slowly, for she had plenty of time as she went down to look about her and to wonder what was going to happen next. First, she tried to look down and make out what she was coming to, but it was too dark to see anything; then she looked at the sides of the well, and noticed that they were filled with cupboards and book-shelves; here and there she saw maps and pictures hung upon pegs. She took down a jar from one of the shelves as she passed; it was labelled `ORANGE MARMALADE', but to her great disappointment it was empty: she did not like to drop the jar for fear of killing somebody, so managed to put it into one of the cupboards as she fell past it. `Well!' thought Alice to herself, `after such a fall as this, I shall think nothing of tumbling down stairs! How brave they'll all think me at home! Why, I wouldn't say anything about it, even if I fell off the top of the house!' (Which was very likely true.) Down, down, down. Would the fall never come to an end! `I wonder how many miles I've fallen by this time?' she said aloud. `I must be getting somewhere near the centre of the earth. Let me see: that would be four thousand miles down, I think--' (for, you see, Alice had learnt several things of this sort in her lessons in the schoolroom, and though this was not a very good opportunity for showing off her knowledge, as there was no one to listen to her, still it was good practice to say it over) `--yes, that's about the right distance--but then I wonder what Latitude or Longitude I've got to?' (Alice had no idea what Latitude was, or Longitude either, but thought they were nice grand words to say.) Presently she began again. `I wonder if I shall fall right through the earth! How funny it'll seem to come out among the people that walk with their heads downward! The Antipathies, I think--' (she was rather glad there was no one listening, this time, as it didn't sound at all the right word) `--but I shall have to ask them what the name of the country is, you know. Please, Ma'am, is this New Zealand or Australia?' (and she tried to curtsey as she spoke--fancy curtseying as you're falling through the air! Do you think you could manage it?) `And what an ignorant little girl she'll think me for asking! No, it'll never do to ask: perhaps I shall see it written up somewhere.' Down, down, down. There was nothing else to do, so Alice soon began talking again. `Dinah'll miss me very much to-night, I should think!' (Dinah was the cat.) `I hope they'll remember her saucer of milk at tea-time. Dinah my dear! I wish you were down here with me! There are no mice in the air, I'm afraid, but you might catch a bat, and that's very like a mouse, you know. But do cats eat bats, I wonder?' And here Alice began to get rather sleepy, and went on saying to herself, in a dreamy sort of way, `Do cats eat bats? Do cats eat bats?' and sometimes, `Do bats eat cats?' for, you see, as she couldn't answer either question, it didn't much matter which way she put it. She felt that she was dozing off, and had just begun to dream that she was walking hand in hand with Dinah, and saying to her very earnestly, `Now, Dinah, tell me the truth: did you ever eat a bat?' when suddenly, thump! thump! down she came upon a heap of sticks and dry leaves, and the fall was over. ",
"return_tokens": "false",
"return_chunks": "true",
"max_chunk_length": 100
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.302.ai/jina/tokenizer' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"content": " CHAPTER I Down the Rabbit-Hole Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, `and what is the use of a book,'\'' thought Alice `without pictures or conversation?'\'' So she was considering in her own mind (as well as she could, for the hot day made her feel very sleepy and stupid), whether the pleasure of making a daisy-chain would be worth the trouble of getting up and picking the daisies, when suddenly a White Rabbit with pink eyes ran close by her. There was nothing so very remarkable in that; nor did Alice think it so very much out of the way to hear the Rabbit say to itself, `Oh dear! Oh dear! I shall be late!'\'' (when she thought it over afterwards, it occurred to her that she ought to have wondered at this, but at the time it all seemed quite natural); but when the Rabbit actually took a watch out of its waistcoat-pocket, and looked at it, and then hurried on, Alice started to her feet, for it flashed across her mind that she had never before seen a rabbit with either a waistcoat-pocket, or a watch to take out of it, and burning with curiosity, she ran across the field after it, and fortunately was just in time to see it pop down a large rabbit-hole under the hedge. White Rabbit checking watch In another moment down went Alice after it, never once considering how in the world she was to get out again. The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well. Either the well was very deep, or she fell very slowly, for she had plenty of time as she went down to look about her and to wonder what was going to happen next. First, she tried to look down and make out what she was coming to, but it was too dark to see anything; then she looked at the sides of the well, and noticed that they were filled with cupboards and book-shelves; here and there she saw maps and pictures hung upon pegs. She took down a jar from one of the shelves as she passed; it was labelled `ORANGE MARMALADE'\'', but to her great disappointment it was empty: she did not like to drop the jar for fear of killing somebody, so managed to put it into one of the cupboards as she fell past it. `Well!'\'' thought Alice to herself, `after such a fall as this, I shall think nothing of tumbling down stairs! How brave they'\''ll all think me at home! Why, I wouldn'\''t say anything about it, even if I fell off the top of the house!'\'' (Which was very likely true.) Down, down, down. Would the fall never come to an end! `I wonder how many miles I'\''ve fallen by this time?'\'' she said aloud. `I must be getting somewhere near the centre of the earth. Let me see: that would be four thousand miles down, I think--'\'' (for, you see, Alice had learnt several things of this sort in her lessons in the schoolroom, and though this was not a very good opportunity for showing off her knowledge, as there was no one to listen to her, still it was good practice to say it over) `--yes, that'\''s about the right distance--but then I wonder what Latitude or Longitude I'\''ve got to?'\'' (Alice had no idea what Latitude was, or Longitude either, but thought they were nice grand words to say.) Presently she began again. `I wonder if I shall fall right through the earth! How funny it'\''ll seem to come out among the people that walk with their heads downward! The Antipathies, I think--'\'' (she was rather glad there was no one listening, this time, as it didn'\''t sound at all the right word) `--but I shall have to ask them what the name of the country is, you know. Please, Ma'\''am, is this New Zealand or Australia?'\'' (and she tried to curtsey as she spoke--fancy curtseying as you'\''re falling through the air! Do you think you could manage it?) `And what an ignorant little girl she'\''ll think me for asking! No, it'\''ll never do to ask: perhaps I shall see it written up somewhere.'\'' Down, down, down. There was nothing else to do, so Alice soon began talking again. `Dinah'\''ll miss me very much to-night, I should think!'\'' (Dinah was the cat.) `I hope they'\''ll remember her saucer of milk at tea-time. Dinah my dear! I wish you were down here with me! There are no mice in the air, I'\''m afraid, but you might catch a bat, and that'\''s very like a mouse, you know. But do cats eat bats, I wonder?'\'' And here Alice began to get rather sleepy, and went on saying to herself, in a dreamy sort of way, `Do cats eat bats? Do cats eat bats?'\'' and sometimes, `Do bats eat cats?'\'' for, you see, as she couldn'\''t answer either question, it didn'\''t much matter which way she put it. She felt that she was dozing off, and had just begun to dream that she was walking hand in hand with Dinah, and saying to her very earnestly, `Now, Dinah, tell me the truth: did you ever eat a bat?'\'' when suddenly, thump! thump! down she came upon a heap of sticks and dry leaves, and the fall was over. ",
"return_tokens": "false",
"return_chunks": "true",
"max_chunk_length":100
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-08-21 09:34:32