MOONSHOT KIMI K2.5
A text model (MOONSHOT-KIMI) available through the ImageGPT Text Generation API.
| Property | Value |
|---|---|
| Model ID | MOONSHOT-KIMI |
| Playground | Text |
| Pricing | 6 credits per 1,000 output tokens |
Headers
Send your API key in the x-api-key header on every request. See
Authentication for details.
| Header | Required | Value |
|---|---|---|
x-api-key | Yes | YOUR_API_KEY |
Content-Type | Yes | application/json |
A missing or invalid key returns 401 Unauthorized.
Parameters
Request body fields for /generate/text:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Yes | — | Model ID to use for generation. See the model list below for all available IDs. |
prompt | string | Yes | — | The user prompt / instruction to send to the model. |
system | string | No | "" | Optional system message to set the model's behavior or persona. |
outputType | string | No | "text" | Output format. Use "text" for plain text or "json" to receive a structured JSON response. |
maxTokens | number | No | model max | Maximum number of output tokens to generate. Minimum value is 100. |
Request examples
- cURL
- JavaScript
- Python
curl -X POST https://api.imagegpt.online/generate/text \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"model":"MOONSHOT-KIMI","prompt":"Build a simple Tic Tac Toe game using only HTML, CSS, and JavaScript with two-player turn-by-turn gameplay and a restart button after the game ends.","system":"You are a friendly assistant.","outputType":"text"}'
fetch('https://api.imagegpt.online/generate/text', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
"model": "MOONSHOT-KIMI",
"prompt": "Build a simple Tic Tac Toe game using only HTML, CSS, and JavaScript with two-player turn-by-turn gameplay and a restart button after the game ends.",
"system": "You are a friendly assistant.",
"outputType": "text"
})
})
.then(res => res.text())
.then(console.log);
import requests
resp = requests.post(
"https://api.imagegpt.online/generate/text",
headers={"x-api-key": "YOUR_API_KEY"},
json={
"model": "MOONSHOT-KIMI",
"prompt": "Build a simple Tic Tac Toe game using only HTML, CSS, and JavaScript with two-player turn-by-turn gameplay and a restart button after the game ends.",
"system": "You are a friendly assistant.",
"outputType": "text"
},
)
print(resp.text)
Response example
text
A plain text string from the model.
json
{
"success": true,
"output": "...",
"usage": {
"inputTokens": 0,
"outputTokens": 0,
"creditsDeducted": 0
}
}
Pricing
6 credits per 1,000 output tokens. Input tokens are always free. The credit value shown per model is charged per 1,000 output tokens.
Playground
Try this model live. Your key is used only in your browser to call the API directly and is never stored.
note
The browser playground calls https://api.imagegpt.online directly, so it only works if the API
allows cross-origin requests from this site. If it is blocked, use the cURL,
JavaScript, or Python samples above from your own server.