1. OpenAI
TikHub-AI-Proxy
  • 默认模块
    • Overview (PLEASE READ)
    • Streaming API
    • OpenAI
      • OpenAI response
        POST
      • OpenAI embeddings
        POST
      • OpenAI audio transcription
        POST
      • DeepSeek chat completion
        POST
      • OpenAI image generation
        POST
      • OpenAI image edit
        POST
      • OpenAI image edit (legacy alias)
        POST
      • Chat completion
        POST
    • Claude
      • Claude message
      • Claude chat completion
    • DeepSeek
      • DeepSeek chat completion
      • DeepSeek chat completion
    • Gemini
      • Gemini content
    • Kimi
      • Chat completion
    • Qwen
      • Chat completion
    • Schemas
      • ChatCompletionRequest
      • ImageGenerationRequest
      • ChatMessage
      • ImageEditRequest
      • Tool
      • ImageGenerationResponse
      • ToolCall
      • ChatCompletionResponse
      • ChatCompletionChoice
      • ContentFilterResults
      • UsageInfo
      • EmbeddingRequest
      • EmbeddingResponse
      • TranscriptionRequest
      • TranscriptionResponse
      • ClaudeMessageRequest
      • ClaudeMessageResponse
      • VideoCreateRequest
      • VideoResponse
      • VideoRemixRequest
      • GeminiGenerateContentRequest
      • VideoListResponse
      • ResponseRequest
      • GeminiContent
      • VideoDeleteResponse
      • GeminiGenerationConfig
      • GeminiGenerateContentResponse
      • ResponseObject
      • SeedanceTaskRequest
      • SeedanceTaskCreateResponse
      • SeedanceTaskResponse
      • KlingText2VideoRequest
      • KlingImage2VideoRequest
      • KlingTaskResponse
      • KlingTaskDetailResponse
      • KlingTaskListResponse
      • VeoGenerateRequest
      • VeoOperationResponse
      • VeoFetchOperationRequest
      • VeoFetchOperationResponse
  • V2
    • OpenAI
      • OpenAI response
      • OpenAI embeddings
      • OpenAI audio transcription
      • Chat completion (all text models)
      • OpenAI image generation
      • OpenAI image edit
      • OpenAI image edit (legacy alias)
    • Claude
      • Claude message
    • DeepSeek
      • DeepSeek chat completion
    • Gemini
      • Gemini content
    • Schemas
      • ChatCompletionRequest
      • ChatMessage
      • Tool
      • ToolCall
      • ChatCompletionResponse
      • ChatCompletionChoice
      • ContentFilterResults
      • UsageInfo
      • EmbeddingRequest
      • EmbeddingResponse
      • TranscriptionResponse
      • ClaudeMessageRequest
      • ClaudeMessageResponse
      • GeminiGenerateContentRequest
      • GeminiContent
      • GeminiGenerationConfig
      • GeminiGenerateContentResponse
      • ResponseRequest
      • ResponseObject
      • ImageGenerationRequest
      • ImageGenerationResponse
  1. OpenAI

OpenAI embeddings

POST
https://ai.tikhub.io/v1/embeddings
OpenAI
Creates an embedding vector representing the input text. Embeddings are useful for search, clustering, recommendations, and other machine learning tasks.

How To Use#

Simply specify the model name in your request payload. All other parameters remain the same across different models.

Supported Models#

text-embedding-3-large
text-embedding-3-small
text-embedding-ada-002

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Examples
{
    "input": "The food was delicious and the waiter...",
    "model": "text-embedding-ada-002",
    "encoding_format": "float"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://ai.tikhub.io/v1/embeddings' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "input": "The food was delicious and the waiter...",
    "model": "text-embedding-ada-002",
    "encoding_format": "float"
}'

Responses

🟢200OK
application/json
Successful response
Bodyapplication/json

Example
{
    "object": "list",
    "data": [
        {
            "object": "embedding",
            "embedding": [
                0.0023064255,
                -0.009327292,
                -0.0028842222
            ],
            "index": 0
        }
    ],
    "model": "text-embedding-ada-002",
    "usage": {
        "prompt_tokens": 8,
        "total_tokens": 8
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠429Too Many Requests
🔴500Internal Server Error
Modified at 2026-07-29 00:56:35
Previous
OpenAI response
Next
OpenAI audio transcription
Built with