curl --request POST \
--url https://api.shuyou.ai/openrouter/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/text-embedding-3-small",
"input": "The quick brown fox jumps over the lazy dog"
}
'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023064255,
-0.009327292,
0.015797377
]
}
],
"model": "openai/text-embedding-3-small",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}OpenRouter
Submit an Embedding Request
Submit an embedding request using the OpenRouter-compatible Embeddings API on ShuYou.
POST
/
openrouter
/
v1
/
embeddings
curl --request POST \
--url https://api.shuyou.ai/openrouter/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/text-embedding-3-small",
"input": "The quick brown fox jumps over the lazy dog"
}
'{
"object": "list",
"data": [
{
"object": "embedding",
"index": 0,
"embedding": [
0.0023064255,
-0.009327292,
0.015797377
]
}
],
"model": "openai/text-embedding-3-small",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Overview
Generate text embeddings through OpenRouter’s embedding router on ShuYou.Request parameters follow the OpenRouter official API exactly. ShuYou only routes and forwards your request — all client parameters are preserved.
https://api.shuyou.ai/openrouter
Endpoint: POST /v1/embeddings
Pass an OpenRouter embedding model slug (for example openai/text-embedding-3-small) and either a string or array of strings in input.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
OpenRouter embedding model slug (e.g. openai/text-embedding-3-small).
Example:
"openai/text-embedding-3-small"
Text or list of texts to embed.
Example:
"The quick brown fox jumps over the lazy dog"
Optional output embedding dimensions.
Required range:
x >= 1Format of the returned embedding vectors.
Available options:
float, base64 Optional input type hint (e.g. search_query, search_document).
Optional end-user identifier for abuse monitoring.