### Kling-O3 Image to Video API Examples Source: https://docs.evolink.ai/en/api-manual/video-series/kling/kling-o3-image-to-video Examples demonstrating different configurations for the kling-o3-image-to-video API. These snippets showcase minimal setup, multi-image inputs, and advanced parameter usage. ```json { "model": "kling-o3-image-to-video", "prompt": "The person in the image slowly turns their head and smiles", "image_start": "https://example.com/portrait.jpg", "duration": 5, "quality": "720p" } ``` ```json { "model": "kling-o3-image-to-video", "prompt": "Transition from daytime to nighttime", "image_start": "https://example.com/day.jpg", "image_end": "https://example.com/night.jpg", "duration": 10, "quality": "1080p", "sound": "on" } ``` ```json { "model": "kling-o3-image-to-video", "prompt": "<<>> dancing in the scene of <<>>", "image_urls": [ "https://example.com/scene.jpg" ], "duration": 8, "aspect_ratio": "16:9", "quality": "1080p", "model_params": { "element_list": [ { "element_id": "123456" } ] } } ``` ```json { "model": "kling-o3-image-to-video", "image_start": "https://example.com/portrait.jpg", "image_urls": [ "https://example.com/bg.jpg" ], "duration": 10, "aspect_ratio": "16:9", "quality": "1080p", "model_params": { "multi_shot": true, "shot_type": "customize", "multi_prompt": [ { "index": 1, "prompt": "<<>> person sitting in a park", "duration": "5" }, { "index": 2, "prompt": "Camera switches to <<>> street view", "duration": "5" } ] } } ``` -------------------------------- ### Install OpenClaw Feishu Plugin Source: https://docs.evolink.ai/en/integration-guide/openclaw-feishu After installing the OpenClaw gateway, install the Feishu plugin using the OpenClaw CLI. ```bash openclaw plugins install @openclaw/feishu ``` -------------------------------- ### Install OpenCode via NPM (Windows) Source: https://docs.evolink.ai/en/integration-guide/opencode Install OpenCode on Windows using NPM after installing Node.js. ```bash npm i -g opencode-ai@latest ``` -------------------------------- ### Multiple images input example Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-3.1-flash-lite-preview/openai-sdk/openai-sdk-reference This example demonstrates how to provide multiple images as input along with text. ```json { "model": "gemini-3.1-flash-lite-preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Compare the differences between these two images" }, { "type": "image_url", "image_url": { "url": "https://example.com/image1.png" } }, { "type": "image_url", "image_url": { "url": "https://example.com/image2.png" } } ] } ] } ``` -------------------------------- ### Install Node.js using Homebrew (macOS) Source: https://docs.evolink.ai/en/integration-guide/openclaw-telegram Use Homebrew to install Node.js on macOS. Verify the installation afterwards. ```bash brew install node node --version npm --version ``` -------------------------------- ### Multimodal input example (text + image) Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-3.1-flash-lite-preview/openai-sdk/openai-sdk-reference This example shows how to combine text and a single image for input. ```json { "model": "gemini-3.1-flash-lite-preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": ">- Please describe the scene and main elements in this image in detail." }, { "type": "image_url", "image_url": { "url": "https://example.com/image.png" } } ] } ] } ``` -------------------------------- ### Verify OpenCode Installation Source: https://docs.evolink.ai/en/integration-guide/opencode Run this command to check if OpenCode has been installed successfully and display its version. ```bash opencode --version ``` -------------------------------- ### Verify Git Installation (Windows) Source: https://docs.evolink.ai/en/integration-guide/openclaw-auto After installing Git on Windows, run this command in PowerShell to confirm the installation. ```bash git --version ``` -------------------------------- ### Verify Node.js and npm Installation (Windows) Source: https://docs.evolink.ai/en/integration-guide/openclaw-auto Run these commands in PowerShell after installing Node.js to verify the installation. It's recommended to run PowerShell as administrator. ```bash node --version npm --version ``` -------------------------------- ### Install OpenClaw Gateway Source: https://docs.evolink.ai/en/integration-guide/openclaw-telegram Install the latest version of OpenClaw globally using npm. ```bash npm install -g openclaw@latest ``` -------------------------------- ### Verify Node.js and npm Installation Source: https://docs.evolink.ai/en/integration-guide/gemini-cli Check if Node.js and npm are installed and meet the version requirements (v20+). ```bash node -v npm -v ``` -------------------------------- ### Run OpenClaw Onboarding Source: https://docs.evolink.ai/en/integration-guide/openclaw-telegram Execute the onboarding command to set up OpenClaw and install the background daemon service. Follow the on-screen prompts for installation mode. ```bash openclaw onboard --install-daemon ``` -------------------------------- ### Gemini-2.5-flash Quick Chat Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-2.5-flash/native-api/native-api-quickstart Call the Gemini-2.5-flash model using the Google Native API format for synchronous processing and real-time conversation content. This example uses minimal parameters for a quick start. ```APIDOC ## POST /v1beta/models/gemini-2.5-flash:generateContent ### Description Call Gemini-2.5-flash model using Google Native API format. Synchronous processing mode, returns conversation content in real-time. Minimal parameters for quick start. 💡 Need more features? Check [Full API Reference](./native-api-reference) ### Method POST ### Endpoint /v1beta/models/gemini-2.5-flash:generateContent ### Request Body - **schema** (object) - Required - Defines the structure of the request payload. ### Responses #### Success Response (200) - **description**: Content generated successfully - **content**: application/json - **schema**: Reference to `#/components/schemas/GenerateContentResponse` #### Error Responses - **400**: Invalid request parameters - **401**: Unauthorized, invalid or expired token - **402**: Insufficient quota, recharge required - **403**: Access denied - **404**: Resource not found - **429**: Rate limit exceeded - **500**: Internal server error - **502**: Upstream service error - **503**: Service temporarily unavailable ``` -------------------------------- ### Create Chat Completion Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-2.5-flash-lite/openai-sdk/openai-sdk-quickstart Call the Gemini 2.5 Flash Lite model using the OpenAI SDK format for synchronous chat completions. This example demonstrates a minimal setup for quick integration. ```APIDOC ## POST /v1/chat/completions ### Description Call gemini-2.5-flash-lite model using OpenAI SDK format. Synchronous processing mode, returns conversation content in real-time. Minimal parameters for quick start. ### Method POST ### Endpoint /v1/chat/completions ### Request Body - **schema** (object) - Required - The request body schema for chat completion. ### Responses #### Success Response (200) - **description** (string) - Chat completion generated successfully. #### Error Responses - **400** (object) - Invalid request parameters. - **401** (object) - Unauthorized, invalid or expired token. - **402** (object) - Insufficient quota, recharge required. - **403** (object) - Access denied. - **404** (object) - Resource not found. - **429** (object) - Rate limit exceeded. - **500** (object) - Internal server error. - **502** (object) - Upstream service error. - **503** (object) - Service temporarily unavailable. ``` -------------------------------- ### Video Edit with Reference Image Request (Fast Mode) Source: https://docs.evolink.ai/en/api-manual/video-series/kling/kling-o1-video-edit-fast This example demonstrates how to perform a fast video edit using a reference image to guide the editing style. The task is processed asynchronously. ```json { "model": "kling-o1-video-edit-fast", "prompt": "Make the video more cinematic", "video_urls": [ "https://example.com/original-video.mp4" ], "image_urls": [ "https://example.com/reference.jpg" ] } ``` -------------------------------- ### Create Qwen Voice Design (Full Parameters) Source: https://docs.evolink.ai/en/api-manual/audio-series/qwen-tts/qwen-voice-design This example demonstrates creating a custom voice profile using all available parameters, including language, sample rate, and response format, in addition to the core voice and preview details. ```json { "model": "qwen-voice-design", "voice_prompt": ">-\n A young, energetic female voice with a fast pace and\n noticeable upward intonation, suitable for introducing\n fashion products", "preview_text": "Hi everyone, welcome to today's fashion review!", "preferred_name": "fashion_host", "language": "en", "sample_rate": 48000, "response_format": "mp3" } ``` -------------------------------- ### Gemini-3.1-pro Chat Completion Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-3.1-pro/openai-sdk/openai-sdk-quickstart This endpoint allows you to interact with the Gemini-3.1-pro model using the OpenAI SDK format. It supports synchronous processing and returns conversation content in real-time. This is a minimal setup for a quick start. ```APIDOC ## POST /v1/chat/completions ### Description Call Gemini-3.1-pro model using OpenAI SDK format. Synchronous processing mode, returns conversation content in real-time. Minimal parameters for quick start. ### Method POST ### Endpoint /v1/chat/completions ### Request Body - **schema** (object) - Required - Defines the structure of the chat completion request. ### Responses #### Success Response (200) - **description**: Chat completion generated successfully - **content**: application/json - **schema**: Reference to the ChatCompletionResponse schema. #### Error Responses - **400**: Invalid request parameters. Example: `{"error": {"code": 400, "message": "Invalid request parameters", "type": "invalid_request_error"}}` - **401**: Unauthorized, invalid or expired token. Example: `{"error": {"code": 401, "message": "Invalid or expired token", "type": "authentication_error"}}` - **402**: Insufficient quota, recharge required. Example: `{"error": {"code": 402, "message": "Insufficient quota", "type": "insufficient_quota_error", "fallback_suggestion": "https://evolink.ai/dashboard/billing"}}` - **403**: Access denied. Example: `{"error": {"code": 403, "message": "Access denied for this model", "type": "permission_error", "param": "model"}}` - **404**: Resource not found. Example: `{"error": {"code": 404, "message": "Specified model not found", "type": "not_found_error", "param": "model", "fallback_suggestion": "gemini-3.1-pro-preview"}}` - **429**: Rate limit exceeded. Example: `{"error": {"code": 429, "message": "Rate limit exceeded", "type": "rate_limit_error", "fallback_suggestion": "retry after 60 seconds"}}` - **500**: Internal server error. Example: `{"error": {"code": 500, "message": "Internal server error", "type": "internal_server_error", "fallback_suggestion": "try again later"}}` - **502**: Upstream service error. Example: `{"error": {"code": 502, "message": "Upstream AI service unavailable", "type": "upstream_error", "fallback_suggestion": "try different model"}}` - **503**: Service temporarily unavailable. Example: `{"error": {"code": 503, "message": "Service temporarily unavailable", "type": "service_unavailable_error"}}` ``` -------------------------------- ### Kling-V3 Image to Video API Examples Source: https://docs.evolink.ai/en/api-manual/video-series/kling/kling-v3-image-to-video Examples demonstrating different use cases for the kling-v3-image-to-video model, including basic image-to-video, first and last frame transitions, element control, and multi-shot generation. ```json { "model": "kling-v3-image-to-video", "prompt": "The person in the scene slowly turns their head and smiles", "image_start": "https://example.com/portrait.jpg", "duration": 5, "quality": "720p" } ``` ```json { "model": "kling-v3-image-to-video", "prompt": "Transition from day to night", "image_start": "https://example.com/day.jpg", "image_end": "https://example.com/night.jpg", "duration": 10, "quality": "1080p", "sound": "on" } ``` ```json { "model": "kling-v3-image-to-video", "prompt": "<<>> is dancing in the scene", "image_start": "https://example.com/background.jpg", "duration": 8, "quality": "1080p", "model_params": { "element_list": [ { "element_id": "123456" } ] } } ``` ```json { "model": "kling-v3-image-to-video", "image_start": "https://example.com/portrait.jpg", "duration": 10, "quality": "1080p", "model_params": { "multi_shot": true, "shot_type": "customize", "multi_prompt": [ { "index": 1, "prompt": "A person sitting in the park", "duration": "5" }, { "index": 2, "prompt": "Camera switches to a full street view", "duration": "5" } ] } } ``` -------------------------------- ### Gemini-3.0-pro Chat Completion Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-3.0-pro/openai-sdk/openai-sdk-quickstart This endpoint allows you to interact with the Gemini-3.0-pro model using the OpenAI SDK format. It supports synchronous processing and returns conversation content in real-time. This is a minimal setup for a quick start. ```APIDOC ## POST /v1/chat/completions ### Description Call Gemini-3.0-pro model using OpenAI SDK format. Synchronous processing mode, returns conversation content in real-time. Minimal parameters for quick start. ### Method POST ### Endpoint /v1/chat/completions ### Request Body - **schema** (object) - Required - The request body schema for chat completion. ### Responses #### Success Response (200) - **description** (string) - Chat completion generated successfully. - **content** (object) - The response content. #### Error Responses - **400** - Invalid request parameters. - **401** - Unauthorized, invalid or expired token. - **402** - Insufficient quota, recharge required. - **403** - Access denied. - **404** - Resource not found. - **429** - Rate limit exceeded. - **500** - Internal server error. - **502** - Upstream service error. - **503** - Service temporarily unavailable. ``` -------------------------------- ### Install OpenCode via Scoop (Windows) Source: https://docs.evolink.ai/en/integration-guide/opencode Install OpenCode on Windows using the Scoop package manager. Ensure the 'extras' bucket is added first. ```bash scoop bucket add extras scoop install extras/opencode ``` -------------------------------- ### Correct Prompt Formatting Example Source: https://docs.evolink.ai/en/api-manual/image-series/midjourney/midjourney-v7-prompt-guide Demonstrates the correct way to format a prompt with parameters, ensuring a space before the double dash and no punctuation within parameters. ```text a yellow Persian cat --ar 1:2 --s 500 ``` -------------------------------- ### Gemini-2.5-pro Quick Chat Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-2.5-pro/native-api/native-api-quickstart Call the Gemini-2.5-pro model using the Google Native API format for synchronous processing and real-time conversation content. This example uses minimal parameters for a quick start. For more features, refer to the Full API Reference. ```APIDOC ## POST /v1beta/models/gemini-2.5-pro:generateContent ### Description This endpoint allows you to interact with the Gemini-2.5-pro model for content generation in a synchronous mode. It's designed for a quick start with essential parameters. ### Method POST ### Endpoint https://direct.evolink.ai/v1beta/models/gemini-2.5-pro:generateContent ### Request Body - **Required**: true - **Content**: application/json - **Schema**: Reference to `#/components/schemas/GenerateContentQuickRequest` ### Responses #### Success Response (200) - **Description**: Content generated successfully - **Content**: application/json - **Schema**: Reference to `#/components/schemas/GenerateContentResponse` #### Error Responses - **400 Bad Request**: Invalid request parameters. Example response includes `error.code: 400`, `error.message: Invalid request parameters`, `error.type: invalid_request_error`. - **401 Unauthorized**: Invalid or expired token. Example response includes `error.code: 401`, `error.message: Invalid or expired token`, `error.type: authentication_error`. - **402 Insufficient Quota**: Recharge required. Example response includes `error.code: 402`, `error.message: Insufficient quota`, `error.type: insufficient_quota_error`, `fallback_suggestion: https://evolink.ai/dashboard/billing`. - **403 Forbidden**: Access denied. Example response includes `error.code: 403`, `error.message: Access denied for this model`, `error.type: permission_error`. - **404 Not Found**: Resource not found. Example response includes `error.code: 404`, `error.message: Model not found`, `error.type: not_found_error`. - **429 Too Many Requests**: Rate limit exceeded. Example response includes `error.code: 429`, `error.message: Rate limit exceeded`, `error.type: rate_limit_error`, `fallback_suggestion: retry after 60 seconds`. - **500 Internal Server Error**: Server error. Example response includes `error.code: 500`, `error.message: Internal server error`, `error.type: internal_server_error`, `fallback_suggestion: try again later`. - **502 Bad Gateway**: Upstream service error. Example response includes `error.code: 502`, `error.message: Upstream AI service unavailable`, `error.type: upstream_error`, `fallback_suggestion: try again later`. - **503 Service Unavailable**: Service temporarily unavailable. Example response includes `error.code: 503`. ``` -------------------------------- ### Kling-O1 Video Edit API Request with Reference Image Source: https://docs.evolink.ai/en/api-manual/video-series/kling/kling-o1-video-edit This example shows how to perform video editing with a reference image. In addition to the video URL and prompt, it includes a URL for a reference image to guide the editing process. Generated video links are valid for 24 hours. ```json { "model": "kling-o1-video-edit", "prompt": "Make the video more cinematic", "video_urls": [ "https://example.com/original-video.mp4" ], "image_urls": [ "https://example.com/reference.jpg" ] } ``` -------------------------------- ### Create Qwen Voice Design (Minimal) Source: https://docs.evolink.ai/en/api-manual/audio-series/qwen-tts/qwen-voice-design Use this example to create a custom voice profile with minimal required parameters. It specifies the model, a voice prompt, and preview text, with an optional preferred name. ```json { "model": "qwen-voice-design", "voice_prompt": ">-\n A calm middle-aged male news anchor with a deep, resonant\n voice, rich in magnetism, steady pace, and clear\n articulation", "preview_text": ">-\n Good evening, listeners. Welcome to the evening news\n broadcast.", "preferred_name": "announcer" } ``` -------------------------------- ### Basic Text to Video Generation Source: https://docs.evolink.ai/en/api-manual/video-series/kling/kling-o3-text-to-video Use this example for simple text-to-video generation. Specify the prompt, desired duration, aspect ratio, and quality. ```json { "model": "kling-o3-text-to-video", "prompt": "A cat running on a grassy field under bright sunshine", "duration": 5, "aspect_ratio": "16:9", "quality": "720p" } ``` -------------------------------- ### Text to Video Example Request Source: https://docs.evolink.ai/en/api-manual/video-series/grok/grok-imagine-text-to-video An example request body for generating a video from a text prompt using the Grok Imagine model. Specifies the model, prompt, duration, mode, aspect ratio, and quality. ```json { "model": "grok-imagine-text-to-video-beta", "prompt": "A cat playing piano in a jazz club", "duration": 10, "mode": "fun", "aspect_ratio": "16:9", "quality": "720p" } ``` -------------------------------- ### System prompt example Source: https://docs.evolink.ai/en/api-manual/language-series/gemini-3.1-flash-lite-preview/openai-sdk/openai-sdk-reference Customize the AI's behavior and role by providing a system prompt. ```json { "model": "gemini-3.1-flash-lite-preview", "messages": [ { "role": "system", "content": ">- You are a professional Python programming assistant, answering questions concisely." }, { "role": "user", "content": "How to read a file?" } ] } ``` -------------------------------- ### Install OpenClaw Gateway Globally Source: https://docs.evolink.ai/en/integration-guide/openclaw Install the latest version of OpenClaw Gateway globally using npm. Verify the installation by checking the version. ```bash npm install -g openclaw@latest openclaw --version ``` -------------------------------- ### Initialize EvoLink Provider in OpenCode Source: https://docs.evolink.ai/en/integration-guide/opencode Configure OpenCode to use EvoLink API by running the login command and following the interactive prompts to select 'other' provider, enter 'evolink-anthropic' as the Provider ID, and any value for the API Key token. ```bash opencode auth login ``` -------------------------------- ### Verify Codex CLI Installation Source: https://docs.evolink.ai/en/integration-guide/codex-cli Confirm that the Codex CLI has been installed successfully by checking its version. A successful installation will display the version number. ```bash codex --version ``` -------------------------------- ### Install Git using Xcode Command Line Tools (macOS) Source: https://docs.evolink.ai/en/integration-guide/openclaw-auto An alternative method to install Git on macOS by using the Xcode Command Line Tools. ```bash xcode-select --install ``` -------------------------------- ### Verify Claude Code CLI Installation Source: https://docs.evolink.ai/en/integration-guide/claude-code-cli Confirm that the Claude Code CLI has been installed successfully by checking its version. A successful installation will display the version number. ```bash claude --version ``` -------------------------------- ### VideoRetalk Generation with Multi-Face and Extension Source: https://docs.evolink.ai/en/api-manual/video-series/videoretalk/videoretalk-video-generate This example demonstrates generating a lip-sync video for a scene with multiple faces and enables video extension. The `ref_image_url` is crucial for specifying the target person when multiple faces are present. ```json { "model": "videoretalk", "video_url": "https://example.com/two-people-talking.mp4", "audio_url": "https://example.com/long-speech.wav", "ref_image_url": "https://example.com/target-person-face.jpg", "video_extension": true, "query_face_threshold": 150 } ``` -------------------------------- ### Install Claude Code CLI on macOS/Linux Source: https://docs.evolink.ai/en/integration-guide/claude-code-cli Use this command to install the Claude Code CLI on macOS or Linux systems. Ensure you have curl installed. If you encounter permission errors, prepend the command with 'sudo'. ```bash curl -fsSL https://claude.ai/install.sh | bash ``` -------------------------------- ### Suno Persona Creation with Vocal Extraction Window Source: https://docs.evolink.ai/en/api-manual/audio-series/suno/suno-persona-creation This example demonstrates how to create a persona while specifying a vocal extraction window using `vocal_start` and `vocal_end` parameters. The difference between `vocal_end` and `vocal_start` must be between 10 and 30 seconds. ```json { "model": "suno-persona", "model_params": { "source_task_id": "task-unified-1774169216-ocqaqde7", "result_id": "4fcc4507-a7ae-4441-ad8a-465c2f61d5bb", "name": "Jazz Vocalist", "description": "Smooth jazz vocal style with warm tones and improvisational flair suitable for lounge music", "vocal_start": 15, "vocal_end": 35, "style": "jazz" } } ``` -------------------------------- ### Verify Gemini CLI Installation Source: https://docs.evolink.ai/en/integration-guide/gemini-cli Confirm that the Gemini CLI has been installed successfully by checking its version. ```bash gemini --version ```