cURL
curl --request GET \
--url https://nano-gpt.com/api/v1/embedding-models \
--header 'Authorization: Bearer <token>'import requests
url = "https://nano-gpt.com/api/v1/embedding-models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nano-gpt.com/api/v1/embedding-models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://nano-gpt.com/api/v1/embedding-models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://nano-gpt.com/api/v1/embedding-models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://nano-gpt.com/api/v1/embedding-models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://nano-gpt.com/api/v1/embedding-models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "text-embedding-3-small",
"object": "model",
"created": 1754480583,
"owned_by": "openai",
"name": "Text Embedding 3 Small",
"description": "Most cost-effective OpenAI embedding model with dimension reduction support",
"dimensions": 1536,
"supports_dimensions": true,
"max_tokens": 8191,
"pricing": {
"per_million_tokens": 0.02,
"currency": "USD"
}
}
]
}{
"error": 123,
"message": "<string>"
}Endpoint Examples
Embedding Models
List all available embedding models with detailed information
GET
/
v1
/
embedding-models
cURL
curl --request GET \
--url https://nano-gpt.com/api/v1/embedding-models \
--header 'Authorization: Bearer <token>'import requests
url = "https://nano-gpt.com/api/v1/embedding-models"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://nano-gpt.com/api/v1/embedding-models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://nano-gpt.com/api/v1/embedding-models",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://nano-gpt.com/api/v1/embedding-models"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://nano-gpt.com/api/v1/embedding-models")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://nano-gpt.com/api/v1/embedding-models")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "text-embedding-3-small",
"object": "model",
"created": 1754480583,
"owned_by": "openai",
"name": "Text Embedding 3 Small",
"description": "Most cost-effective OpenAI embedding model with dimension reduction support",
"dimensions": 1536,
"supports_dimensions": true,
"max_tokens": 8191,
"pricing": {
"per_million_tokens": 0.02,
"currency": "USD"
}
}
]
}{
"error": 123,
"message": "<string>"
}Overview
The/api/v1/embedding-models endpoint provides a comprehensive list of available embedding models with detailed information including dimensions, max dimensions, token limits, pricing, and feature support. Use this endpoint instead of hardcoding embedding model capabilities.
This endpoint is cacheable. Refresh it periodically because model availability can change.
Authentication
Authentication is optional but may enable user-specific features:| Header | Format | Required | Description |
|---|---|---|---|
Authorization | Bearer {api_key} | Optional | API key for authenticated access |
x-api-key | {api_key} | Optional | Alternative API key header |
Response Format
Returns a list of all available embedding models with comprehensive details:{
"object": "list",
"data": [
{
"id": "text-embedding-3-small",
"object": "model",
"created": 1754480583,
"owned_by": "openai",
"name": "Text Embedding 3 Small",
"description": "Most cost-effective OpenAI embedding model with dimension reduction support",
"dimensions": 1536,
"max_dimensions": 1536,
"supports_dimensions": true,
"max_tokens": 8191,
"pricing": {
"per_million_tokens": 0.02,
"currency": "USD"
}
},
{
"id": "text-embedding-3-large",
"object": "model",
"created": 1754480583,
"owned_by": "openai",
"name": "Text Embedding 3 Large",
"description": "Highest performance OpenAI embedding model with dimension reduction support",
"dimensions": 3072,
"max_dimensions": 3072,
"supports_dimensions": true,
"max_tokens": 8191,
"pricing": {
"per_million_tokens": 0.13,
"currency": "USD"
}
},
{
"id": "BAAI/bge-m3",
"object": "model",
"created": 1754480583,
"owned_by": "baai",
"name": "BGE M3",
"description": "Multilingual embedding model with excellent performance across languages",
"dimensions": 1024,
"max_dimensions": 1024,
"supports_dimensions": false,
"max_tokens": 8192,
"pricing": {
"per_million_tokens": 0.01,
"currency": "USD"
}
}
// ... more models
]
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
id | string | Unique model identifier to use in embedding requests |
object | string | Always “model” for OpenAI compatibility |
created | number | Unix timestamp of response creation |
owned_by | string | Model provider (openai, baai, jina, etc.) |
name | string | Human-readable model name |
description | string | Detailed model description and use cases |
dimensions | number | Default embedding vector dimensions |
max_dimensions | number | Maximum embedding vector dimensions supported |
supports_dimensions | boolean | Whether custom dimensions are supported |
max_tokens | number | Maximum input tokens supported |
pricing | object | Pricing information object |
Pricing Object Structure
| Field | Type | Description |
|---|---|---|
per_million_tokens | number | Cost per million tokens in USD |
currency | string | Always “USD” |
Model Categories
OpenAI Models
High-quality embeddings with dimension reduction support:text-embedding-3-small- Balance of cost and performancetext-embedding-3-large- Maximum accuracytext-embedding-ada-002- Legacy model
Multilingual Models
Support for multiple languages:BAAI/bge-m3- Excellent multilingual supportjina-clip-v1- Multimodal CLIP embeddings
Language-Specific Models
Optimized for specific languages:- English:
BAAI/bge-base-en-v1.5,BAAI/bge-large-en-v1.5,jina-embeddings-v2-base-en - Chinese:
BAAI/bge-large-zh-v1.5,jina-embeddings-v2-base-zh,zhipu-embedding-2 - German:
jina-embeddings-v2-base-de - Spanish:
jina-embeddings-v2-base-es
Specialized Models
Domain-specific embeddings:jina-embeddings-v2-base-code- Optimized for codeBaichuan-Text-Embedding- General purposeQwen/Qwen3-Embedding-0.6B- Efficient with dimension reductionQwen/Qwen3-Embedding-4B- Higher quality Qwen embeddingsQwen/Qwen3-Embedding-8B- Long-context Qwen embeddingsBAAI/bge-reranker-large- Reranking modeljina-embeddings-v3/jina-embeddings-v4- Newer Jina embedding modelsgemini-embedding-001- Gemini embeddingsdoubao-embedding-large-text-240915- High-dimensional embeddings (4096 dims)
Usage Examples
Basic Request
curl "https://nano-gpt.com/api/v1/embedding-models"
With Authentication
curl "https://nano-gpt.com/api/v1/embedding-models" \
-H "Authorization: Bearer your_api_key_here"
Python Example
import requests
# Discover available embedding models
response = requests.get("https://nano-gpt.com/api/v1/embedding-models")
models = response.json()
# Display models sorted by price
for model in sorted(models["data"], key=lambda x: x["pricing"]["per_million_tokens"]):
print(f"{model['id']}: ${model['pricing']['per_million_tokens']}/1M tokens - {model['dimensions']} dims")
JavaScript Example
// Discover available embedding models
const response = await fetch("https://nano-gpt.com/api/v1/embedding-models");
const models = await response.json();
// Find models that support dimension reduction
const flexibleModels = models.data.filter(m => m.supports_dimensions);
console.log("Models with dimension reduction:", flexibleModels.map(m => m.id));
Model Selection Guide
| Use Case | Recommended Models | Rationale |
|---|---|---|
| General English text | text-embedding-3-small | Best price/performance ratio |
| Maximum accuracy | text-embedding-3-large | Highest quality embeddings |
| Multilingual content | BAAI/bge-m3 | Excellent cross-language performance |
| Code embeddings | jina-embeddings-v2-base-code | Specialized for programming languages |
| Budget-conscious | BAAI/bge-large-en-v1.5 | $0.01/1M tokens |
| Chinese content | BAAI/bge-large-zh-v1.5 | Optimized for Chinese |
| Fast similarity search | Models with supports_dimensions: true | Can reduce dimensions for speed |
Authorizations
bearerAuthapiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.