1. OpenAI
TikHub-AI-Proxy
  • Overview (PLEASE READ)
  • Streaming API
  • OpenAI
    • OpenAI response
      POST
    • OpenAI embeddings
      POST
    • OpenAI audio transcription
      POST
    • OpenAI chat completion
      POST
  • Claude
    • Claude chat completion
      POST
    • Claude message
      POST
  • DeepSeek
    • DeepSeek chat completion
      POST
  • Sora
    • Sora video generation
      POST
    • Get Sora video status
      GET
    • Download Sora video content
      GET
    • Remix Sora video
      POST
    • List Sora videos
      GET
    • Delete Sora video
      DELETE
  • Gemini
    • Gemini content
      POST
  • Seedance
    • Seedance video generation
      POST
    • Retrieve Seedance task
      GET
  • Kling
    • Kling text-to-video
      POST
    • Retrieve Kling text-to-video task
      GET
    • Kling image-to-video
      POST
    • Retrieve Kling image-to-video task
      GET
  • Veo
    • Veo video generation
    • Fetch Veo video generation status
  • Schemas
    • ChatCompletionRequest
    • ChatMessage
    • Tool
    • ToolCall
    • ChatCompletionResponse
    • ChatCompletionChoice
    • ContentFilterResults
    • UsageInfo
    • EmbeddingRequest
    • EmbeddingResponse
    • TranscriptionRequest
    • TranscriptionResponse
    • ClaudeMessageRequest
    • ClaudeMessageResponse
    • VideoCreateRequest
    • VideoResponse
    • VideoRemixRequest
    • GeminiGenerateContentRequest
    • VideoListResponse
    • GeminiContent
    • VideoDeleteResponse
    • GeminiGenerationConfig
    • ResponseRequest
    • GeminiGenerateContentResponse
    • ResponseObject
    • SeedanceTaskRequest
    • SeedanceTaskCreateResponse
    • SeedanceTaskResponse
    • KlingText2VideoRequest
    • KlingImage2VideoRequest
    • KlingTaskResponse
    • KlingTaskDetailResponse
    • KlingTaskListResponse
    • VeoGenerateRequest
    • VeoOperationResponse
    • VeoFetchOperationRequest
    • VeoFetchOperationResponse
  1. OpenAI

OpenAI chat completion

POST
https://ai.tikhub.io/v1/chat/completions
OpenAI
Creates a chat completion using a conversational message format. This endpoint supports multi-turn conversations with system, user, and assistant messages.

How To Use#

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

Supported Models#

GPT-3.5 series: gpt-3.5-turbo, gpt-3.5-turbo-0125, gpt-3.5-turbo-0613, gpt-3.5-turbo-1106, gpt-3.5-turbo-16k, gpt-3.5-turbo-16k-0613
GPT-4 series: gpt-4-32k, gpt-4-32k-0613, gpt-4-turbo, gpt-4-turbo-2024-04-09, gpt-4-vision-preview
GPT-4.1 series: gpt-4.1, gpt-4.1-2025-04-14, gpt-4.1-mini, gpt-4.1-mini-2025-04-14, gpt-4.1-nano, gpt-4.1-nano-2025-04-14
GPT-4o series: gpt-4o, gpt-4o-2024-05-13, gpt-4o-2024-08-06, gpt-4o-2024-11-20, gpt-4o-mini, gpt-4o-mini-2024-07-18
GPT-5 series: gpt-5, gpt-5-2025-08-07, gpt-5-chat-latest, gpt-5-mini, gpt-5-nano
O1 series: o1, o1-2024-12-17, o1-mini, o1-mini-2024-09-12, o1-preview, o1-preview-2024-09-12
O3 series: o3, o3-2025-04-16, o3-mini, o3-mini-2025-01-31, o3-pro
O4 series: o4-mini, o4-mini-2025-04-16

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
{
    "model": "gpt-4o",
    "max_tokens": 1024,
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Hello!"
        }
    ]
}

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 --request POST 'https://ai.tikhub.io/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-4o",
    "max_tokens": 1024,
    "messages": [
        {
            "role": "system",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Hello!"
        }
    ]
}'

Responses

🟢200OK
application/json
Successful response
Body

Example
{
    "choices": [
        {
            "content_filter_results": {
                "hate": {
                    "filtered": false,
                    "severity": "safe"
                },
                "protected_material_code": {
                    "filtered": false,
                    "detected": false
                },
                "protected_material_text": {
                    "filtered": false,
                    "detected": false
                },
                "self_harm": {
                    "filtered": false,
                    "severity": "safe"
                },
                "sexual": {
                    "filtered": false,
                    "severity": "safe"
                },
                "violence": {
                    "filtered": false,
                    "severity": "safe"
                }
            },
            "finish_reason": "stop",
            "index": 0,
            "logprobs": null,
            "message": {
                "annotations": [],
                "content": "Hello! I'm ChatGPT, a large language model created by OpenAI based on the GPT-4 architecture. I'm designed to understand and generate natural language so I can help answer questions, assist with tasks, and have open-ended conversations.",
                "refusal": null,
                "role": "assistant"
            }
        }
    ],
    "created": 1769503909,
    "id": "chatcmpl-D2Z5Zt1vNXljenyUCj2M42Xe2LjL6",
    "model": "o3-2025-04-16",
    "object": "chat.completion",
    "prompt_filter_results": [
        {
            "prompt_index": 0,
            "content_filter_results": {
                "hate": {
                    "filtered": false,
                    "severity": "safe"
                },
                "jailbreak": {
                    "filtered": false,
                    "detected": false
                },
                "self_harm": {
                    "filtered": false,
                    "severity": "safe"
                },
                "sexual": {
                    "filtered": false,
                    "severity": "safe"
                },
                "violence": {
                    "filtered": false,
                    "severity": "safe"
                }
            }
        }
    ],
    "system_fingerprint": null,
    "usage": {
        "completion_tokens": 133,
        "completion_tokens_details": {
            "accepted_prediction_tokens": 0,
            "audio_tokens": 0,
            "reasoning_tokens": 64,
            "rejected_prediction_tokens": 0
        },
        "prompt_tokens": 13,
        "prompt_tokens_details": {
            "audio_tokens": 0,
            "cached_tokens": 0
        },
        "total_tokens": 146
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠429Too Many Requests
🔴500Internal Server Error
Modified at 2026-03-02 20:33:07
Previous
OpenAI audio transcription
Next
Claude chat completion
Built with