orrisapi en
  1. OpenAI
orrisapi en
  • How to Integrate CCAPI LLM into OpenClaw
  • Chat
    • Google
      • Gemini Generate Content
      • Gemini Stream Generate Content
    • Anthropic
      • Create Claude Message
    • OpenAI
      • Create Chat Completion
        POST
      • Create Response (OpenAI Responses API)
        POST
    • DeepSeek
      • Create Chat Completion
    • MiniMax
      • Create Chat Completion
    • Create Text Completion (Legacy)
      POST
  • Image
    • nano banana (Gemini Native)
      • Generate Image With Gemini Native API
    • nano banana (Pay-per-image)
      • Generate Image
  • Video
    • Vidu Video Generation API
    • Seedance Video Generation API
    • Generate Video
      POST
    • Query Video Task
      GET
    • Video Content Proxy
      GET
    • Kling Text-to-Video
      POST
    • Kling Text-to-Video Task Status
      GET
    • Kling Image-to-Video
      POST
    • Kling Image-to-Video Task Status
      GET
  • Images
    • Jimeng Image Generate
      POST
  • Audio
    • Producer
      • Producer Submit - Generate Music
      • Producer Submit - Generate Lyrics
      • Producer Submit - Extend Music
      • Producer Submit - Generate Cover
      • Producer Submit - Generate Variation
      • Producer Submit - Replace Track
      • Producer Submit - Vocals Swap
      • Producer Submit - Instrumentals Swap
      • Producer Submit - Stems Separation
      • Producer Submit - Download
      • Producer Submit - Upload Audio
      • Producer Submit - Generate Video
      • Producer Fetch Task by ID
      • Producer Fetch Tasks (Batch)
    • Suno
      • Suno Submit - Generate Music
      • Suno Submit - Generate Lyrics
      • Suno Submit - Extend Song
      • Suno Submit - Generate Cover
      • Suno Submit - Stems Separation
      • Suno Submit - Full Stems Separation
      • Suno Submit - Add Vocals
      • Suno Submit - Add Instrumental
      • Suno Submit - Replace Section
      • Suno Submit - Remaster
      • Suno Submit - Mashup
      • Suno Submit - Sample
      • Suno Submit - Generate Sound Effects
      • Suno Submit - Generate MIDI
      • Suno Submit - Upload Audio
      • Suno Submit - Concatenate Tracks
      • Suno Submit - Aligned Lyrics
      • Suno Submit - Generate Music Video
      • Suno Submit - Download as WAV
      • Suno Submit - Persona Voice
      • Suno Submit - Generate with BPM
      • Suno Submit - Vox (Vocals Only)
      • Suno Submit - Upsample Tags
      • Suno Fetch Task by ID
      • Suno Fetch Tasks (Batch)
    • Create Transcription
      POST
    • Create Translation
      POST
    • Suno Generate (Unified)
      POST
    • Suno Fetch (Unified)
      GET
    • Producer Generate (Unified)
      POST
    • Producer Fetch (Unified)
      GET
  • Embeddings
    • Create Embeddings
  • Models
    • List Models
    • Get Model
  • Moderation
    • Create Moderation
  • Midjourney
    • Midjourney Imagine
    • Midjourney Task Status
  • Realtime
    • Realtime API (WebSocket)
  • Schemas
    • RequestBodies
      • producerSubmitCoverBody
      • jimengGenerateBody
      • producerSubmitUploadBody
      • producerSubmitDownloadBody
      • producerFetchBatchBody
    • ErrorResponse
    • OpenAIError
    • ChatCompletionRequest
    • Message
    • ContentPart
    • ToolCall
    • ToolCallResponse
    • ChatCompletionResponse
    • ChatCompletionStreamResponse
    • ResponsesRequest
    • ResponsesResponse
    • ImageRequest
    • ImageResponse
    • VideoResponse
    • KlingText2VideoRequest
    • KlingImage2VideoRequest
    • AudioResponse
    • EmbeddingRequest
    • EmbeddingResponse
    • Model
    • Usage
    • ProducerMusicRequest
    • ProducerTaskResponse
    • ProducerFetchResponse
    • SunoMusicRequest
    • SunoTaskResponse
    • SunoFetchResponse
  1. OpenAI

Create Chat Completion

POST
/v1/chat/completions
Create a chat completion using the OpenAI-compatible format.
For detailed API documentation, refer to the OpenAI Developer Documentation: https://developers.openai.com/api/docs/.
When stream=true, the response is text/event-stream (SSE format), with data: {json}\n\n lines,
terminated by data: [DONE].
Brand-specific notes:
DeepSeek: Use model deepseek-v3.2 with this same endpoint
MiniMax: Use model minimax-m2.5 with this same endpoint
Gemini: Use model gemini-2.5-pro etc. with this same endpoint (or native format via /v1beta/...)
Claude: Can also use this endpoint, but native format via /v1/messages is recommended
智谱 (Zhipu): Use model glm-5 with this same endpoint
Supported models include:
OpenAI: gpt-5, gpt-5-mini, gpt-5-pro, gpt-4o, o3, o4-mini, and more
Anthropic: claude-sonnet-4-6, claude-opus-4-6, claude-haiku-4-5
Google Gemini: gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview
DeepSeek: deepseek-v3.2
MiniMax: minimax-m2.5
Zhipu: glm-5

Request

Authorization
API Key
Add parameter in header
Authorization
Example:
Authorization: ********************
or
Body Params application/jsonRequired

Example
{
    "model": "gpt-5",
    "messages": [
        {
            "role": "system",
            "content": "string",
            "name": "string",
            "tool_calls": [
                {
                    "index": 0,
                    "id": "string",
                    "type": "string",
                    "function": {
                        "name": "string",
                        "arguments": "string"
                    }
                }
            ],
            "tool_call_id": "string",
            "reasoning_content": "string"
        }
    ],
    "stream": false,
    "stream_options": {
        "include_usage": true
    },
    "max_tokens": 0,
    "max_completion_tokens": 0,
    "temperature": 0,
    "top_p": 0,
    "top_k": 0,
    "n": 1,
    "stop": "string",
    "frequency_penalty": -2,
    "presence_penalty": -2,
    "response_format": {
        "type": "text",
        "json_schema": {}
    },
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "string",
                "description": "string",
                "parameters": {}
            }
        }
    ],
    "tool_choice": "none",
    "reasoning_effort": "low",
    "seed": 0,
    "user": "string",
    "logprobs": true,
    "top_logprobs": 0
}

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 --location --request POST 'https://api.ccapi.ai//v1/chat/completions' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-5",
    "messages": [
        {
            "role": "system",
            "content": "string",
            "name": "string",
            "tool_calls": [
                {
                    "index": 0,
                    "id": "string",
                    "type": "string",
                    "function": {
                        "name": "string",
                        "arguments": "string"
                    }
                }
            ],
            "tool_call_id": "string",
            "reasoning_content": "string"
        }
    ],
    "stream": false,
    "stream_options": {
        "include_usage": true
    },
    "max_tokens": 0,
    "max_completion_tokens": 0,
    "temperature": 0,
    "top_p": 0,
    "top_k": 0,
    "n": 1,
    "stop": "string",
    "frequency_penalty": -2,
    "presence_penalty": -2,
    "response_format": {
        "type": "text",
        "json_schema": {}
    },
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "string",
                "description": "string",
                "parameters": {}
            }
        }
    ],
    "tool_choice": "none",
    "reasoning_effort": "low",
    "seed": 0,
    "user": "string",
    "logprobs": true,
    "top_logprobs": 0
}'

Responses

🟢200success
application/json
Chat completion response (or SSE stream when stream is true)
Body

Example
{
    "id": "chatcmpl-abc123",
    "object": "chat.completion",
    "created": 1700000000,
    "model": "gpt-5",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Hello! How can I help you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 10,
        "completion_tokens": 8,
        "total_tokens": 18
    }
}
🟠400未认证
🟠401
🟠402
🟠429
🔴500
Modified at 2026-03-15 06:56:57
Previous
Create Claude Message
Next
Create Response (OpenAI Responses API)
Built with