Skip to content
Qwen logo

qwen3-embedding-0.6b

Text EmbeddingsQwen
@cf/qwen/qwen3-embedding-0.6b

The Qwen3 Embedding model series is the latest proprietary model of the Qwen family, specifically designed for text embedding and ranking tasks.

Model Info
Context Window8,192 tokens
Unit Pricing$0.012 per M input tokens

Usage

export interface Env {
AI: Ai;
}
export default {
async fetch(request, env): Promise<Response> {
// Can be a string or array of strings]
const stories = [
"This is a story about an orange cloud",
"This is a story about a llama",
"This is a story about a hugging emoji",
];
const embeddings = await env.AI.run(
"@cf/qwen/qwen3-embedding-0.6b",
{
text: stories,
}
);
return Response.json(embeddings);
},
} satisfies ExportedHandler<Env>;

Parameters

* indicates a required field

Input

  • queries one of

    • 0 string min 1

      A single query string

    • 1 array

      An array of query strings

      • items string min 1

  • instruction string default Given a web search query, retrieve relevant passages that answer the query

    Optional instruction for the task

  • documents one of

    • 0 string min 1

      A single document string

    • 1 array

      An array of document strings

      • items string min 1

  • text one of

    • 0 string min 1

      Alias for documents: a single text string

    • 1 array

      Alias for documents: an array of text strings

      • items string min 1

Output

  • data array

    • items array

      • items number

  • shape array

    • items integer

API Schemas

The following schemas are based on JSON Schema

{
"type": "object",
"properties": {
"queries": {
"oneOf": [
{
"type": "string",
"description": "A single query string",
"minLength": 1
},
{
"type": "array",
"description": "An array of query strings",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 32
}
]
},
"instruction": {
"type": "string",
"default": "Given a web search query, retrieve relevant passages that answer the query",
"description": "Optional instruction for the task"
},
"documents": {
"oneOf": [
{
"type": "string",
"description": "A single document string",
"minLength": 1
},
{
"type": "array",
"description": "An array of document strings",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 32
}
]
},
"text": {
"oneOf": [
{
"type": "string",
"description": "Alias for documents: a single text string",
"minLength": 1
},
{
"type": "array",
"description": "Alias for documents: an array of text strings",
"items": {
"type": "string",
"minLength": 1
},
"maxItems": 32
}
]
}
}
}