Implementation:Open compass VLMEvalKit KimiVLAPIWrapper
| Field | Value |
|---|---|
| source | VLMEvalKit |
| domain | Vision, API_Integration |
Overview
KimiVLAPIWrapper provides a VLMEvalKit API adapter for Moonshot's Kimi VL thinking vision-language models.
Description
KimiVLAPIWrapper inherits from BaseAPI and communicates with the Kimi VL API via an OpenAI-compatible chat completions endpoint. It includes a summary extraction function that strips thinking tags from model outputs, supports configurable API base URLs through the KIMI_VL_API_BASE environment variable, and handles image encoding to base64. Authentication uses the KIMI_VL_API_KEY environment variable.
Usage
Use this adapter when evaluating Kimi VL thinking models (such as api-kimi-vl-thinking-2506) through the Moonshot API.
Code Reference
- Source:
vlmeval/api/kimivl_api.py, Lines: L1-159 - Import:
from vlmeval.api.kimivl_api import KimiVLAPIWrapper
Signature:
class KimiVLAPIWrapper(BaseAPI):
def __init__(self, model='api-kimi-vl-thinking-2506', retry=5, key=None,
verbose=True, system_prompt=None, temperature=0.8,
timeout=360, api_base='OFFICIAL', max_tokens=32768,
**kwargs): ...
def generate_inner(self, inputs, **kwargs): ...
I/O Contract
| Direction | Description |
|---|---|
| Inputs | message — text/image/video content list; model-specific params via kwargs |
| Outputs | generate() returns str prediction; generate_inner() returns (int, str, str) tuple |
Usage Examples
# Example instantiation
model = KimiVLAPIWrapper(model='api-kimi-vl-thinking-2506')
response = model.generate(message)