Use Kryven in your code, your editor, or your favourite chat app.
Kryven's REST API is fully OpenAI-compatible. Drop-in replacement for any client that accepts a custom base URL — Cursor, Cline (VS Code), Janitor AI, SillyTavern, the OpenAI Python/Node SDKs, and more. Plus our own image and video generation endpoints for uncensored media at scale.
API Integration
Harness Kryven AI models in your own applications.
The Power of Kryven API
The Kryven AI API empowers developers to integrate our highly performant, entirely uncensored models into external applications, Discord bots, internal tooling, and reverse proxies. By adhering strictly to the industry-standard OpenAI API specification, integrating Kryven is as simple as changing a Base URL and your API key.
Authentication
Every request to the Kryven API must include an Authorization header containing your private API Key. Keys always begin with kry_sk_.
To generate an API key, make a POST request to the token endpoint while authenticated with your Kryven session:
curl -X POST https://kryven.cc/api/v1/auth/token \
--cookie "your_session_cookie" \
-H "Content-Type: application/json" \
-d '{"name": "My App Key"}'
The key is returned only once in the response — store it securely immediately. You can also list or delete your existing keys via GET /api/v1/auth/keys and DELETE /api/v1/auth/keys/:keyId.
Authorization: Bearer YOUR_KRYVEN_API_KEY
403 Forbidden error.Base Endpoint
All standard completion requests should be directed to the unified v1 endpoint:
https://kryven.cc/v1
Chat Completions (/v1/chat/completions)
The Chat Completions endpoint is the core of Kryven's text generation API. It accepts an array of messages and returns a model-generated response. Because it matches the OpenAI schema, you can use official OpenAI SDKs for Python or Node.js simply by overriding the baseURL.
Example Request (cURL)
curl https://kryven.cc/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_KRYVEN_API_KEY" \
-d '{
"model": "kry5.2-flash",
"messages": [
{
"role": "system",
"content": "You are a helpful, capable coding assistant."
},
{
"role": "user",
"content": "Write a Python function that returns the Fibonacci sequence up to n."
}
],
"max_tokens": 4000
}'
Key Parameters
model(Optional, Default:kry5.2-flash): The identifier of the Kryven model you wish to use. Available models:kry5.2-flash(fast, default) andkry5.2-extended(higher quality).messages(Required): A non-empty array of message dictionaries comprising the conversation history. Each message must contain aroleandcontent. Ensure at least one message has the roleuser.max_tokens(Optional, Default: 4000): The maximum number of tokens to generate in the completion.stream(Optional, Default: false): If set totrue, the API will return a streaming Server-Sent Event (SSE) response.
temperature or top_p are currently locked to optimal presets at the API layer to ensure maximum coherence and speed across the uncensored cluster.Error Handling
Kryven utilizes standard HTTP semantics for error responses.
| Status Code | Cause |
|---|---|
| 400 Bad Request | Missing messages array, or content safety violation. |
| 401 Unauthorized | Invalid, missing, or inactive kry_sk_ API key. |
| 402 Payment Required | Insufficient token balance to cover the generation cost. |
| 403 Forbidden | The provided API key lacks Developer or high-tier PAYG permissions. |
| 429 Too Many Requests | Rate limit exceeded. The Retry-After header will indicate the cooldown period in seconds. |
Usage Endpoint (/v1/usage)
You can programmatically check your remaining token balance and API call statistics by making a simple GET request to the usage endpoint.
curl https://kryven.cc/v1/usage \
-H "Authorization: Bearer YOUR_KRYVEN_API_KEY"
Cursor
Use Kryven AI as your coding assistant inside Cursor IDE.
Setting up Cursor with Kryven
Cursor is a powerful AI-first code editor built on top of VS Code. Because Kryven's API is fully OpenAI-compatible, you can use it as a drop-in provider in Cursor.
Step-by-Step Guide
- Open Cursor Settings. Go to
Cursor Settings → Models(or pressCmd/Ctrl + Shift + J). - Add OpenAI API Key. Under the OpenAI API Key section, enter your Kryven API key (starts with
kry_sk_). - Override the Base URL. Toggle Override OpenAI Base URL and enter:
https://kryven.cc/v1
- Add a Custom Model. Click + Add Model and enter one of the following model names:
kryven-flash— Fast responses, great for quick edits and autocompletekryven-extended— Higher quality, better for complex reasoning and refactoringkryven-coder— Optimized for code generation and debugging
- Select the Model. In any Cursor chat or inline edit, use the model selector dropdown to choose your Kryven model. You can also set it as the default for Cmd+K, Tab, and Agent features.
kryven-flash for Tab autocomplete (speed matters) and kryven-extended or kryven-coder for Agent and Cmd+K tasks where quality matters more.VS Code (Cline)
Use Kryven AI as your autonomous coding agent inside Visual Studio Code.
Setting up Cline with Kryven
Cline is an autonomous AI coding agent for VS Code that can read your files, run terminal commands, and make multi-file edits. Because Kryven's API is fully OpenAI-compatible, Cline works out of the box.
Step-by-Step Guide
- Install Cline. Open VS Code, go to the Extensions tab, and search for
Cline. Click Install. - Open Cline Settings. Click the Cline icon in your sidebar. At the top of the Cline panel, click the settings gear icon to open the provider configuration.
- Select OpenAI Compatible as the Provider. In the API Provider dropdown, select OpenAI Compatible.
- Configure the Connection. Set the Base URL to:
https://kryven.cc/v1
- Enter Your API Key and Choose a Model. Paste your Kryven API key (starts with
kry_sk_) in the API Key field, then set the Model ID to one of:kryven-flash— Fastest, great for simple tasks and iterationkryven-extended— Best balance of speed and quality for complex coding taskskryven-coder— Maximum code quality, optimized for generation and debugging
- Start Using Cline. Type a task in the Cline chat (e.g., "Refactor the auth module to use JWT tokens") and let Cline autonomously plan, edit, and verify your code using Kryven's models.
kryven-extended or kryven-coder — they handle multi-step planning and large context windows better than flash.Janitor AI / SillyTavern
How to use Kryven AI as your backend for third-party roleplay apps.
Using Kryven as a Proxy Backend
Because Kryven supports completely uncensored roleplay and is 100% interoperable with OpenAI's API format, it is extremely popular to use Kryven as a drop-in replacement reverse proxy for services like Janitor AI and SillyTavern.
Setup in Janitor AI
- Log into your Janitor AI account and enter a chat with a character.
- Open the API Settings (usually in the right sidebar or header menu).
- Select OpenAI as your API provider.
- Input your Kryven Developer API Key into the OpenAI API Key field.
- Expand the Reverse Proxy or Custom Endpoint settings.
- Check the box to enable the Custom URL.
- Enter the following URL exactly as shown:
https://kryven.cc/v1
- Check your connection. Janitor AI will now route all LLM generation requests directly through Kryven's servers using our uncensored models.
Setup in SillyTavern
- Open SillyTavern and go to the API Connections menu (the plug icon).
- Select the Chat Completion API type and choose OpenAI.
- Under the API Connection settings, toggle Reverse Proxy.
- Set the Proxy URL to
https://kryven.cc/v1. - Enter your Kryven AI API key.
- Click Connect. The dot should turn green.
Media Generation API
Comprehensive guide to Kryven's text2img, img2img, and img2vid endpoints.
Overview
Kryven AI goes beyond text, offering an extremely powerful suite of uncensored media generation API endpoints.
1. Image Generation (/v1/images/generate)
The image generation endpoint (/v1/images/generate) handles both standard text-to-image and img-to-img capabilities, depending on the payload.
Request Body JSON Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | String | Yes | The core description of the image. Be as detailed as possible. |
| model_type | String | No | Must be either 'advanced' or 'seedream'. Default is 'advanced'. |
| input_images | Array | No | Array of up to 2 publicly accessible image URLs or Base64 strings. If populated, the pipeline automatically acts as an img2img modifier. |
| width | Integer | No | Desired width in pixels (min 256, max 2048). Default 1024. |
| height | Integer | No | Desired height in pixels (min 256, max 2048). Default 1024. |
| aspect_ratio | String | No | A shorthand for width/height (e.g., '1:1', '16:9', '9:16', '4:3', '3:2'). If provided instead of explicit width/height, it will auto-resolve the dimensions. |
Example Request (Text-to-Image)
curl -X POST https://kryven.cc/v1/images/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_KRYVEN_API_KEY" \
-d '{
"prompt": "A breathtaking cinematic portrait of a cyberpunk hacker in a neon-lit alleyway at night, highly detailed, 8k resolution, ray tracing.",
"model_type": "advanced",
"aspect_ratio": "16:9"
}'
Example Request (Image-to-Image)
Simply supply an input_images array alongside your prompt target.
{
"prompt": "Turn the subject into a stylized anime character, Studio Ghibli style, vibrant colors",
"input_images": ["https://example.com/my-original-photo.jpg"],
"model_type": "seedream"
}
Response Format
Because Kryven's endpoints are interoperable with the OpenAI schema, a successful image generation will return a JSON object populated with a direct URL to the final asset:
{
"created": 1700000000,
"data": [
{
"url": "https://kryven-assets.../generated/image.jpg"
}
]
}
2. Image-to-Video (/v1/videos/generate)
The video endpoint takes an existing image — often one generated from the image endpoints — and animates it entirely into a 4-second video sequence.
Endpoint: POST https://kryven.cc/v1/videos/generate
402 Payment Required error.Request Body JSON Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| init_image | String | Yes | A publicly accessible URL to the static image you want to animate. Must not be empty. |
| prompt | String | No | Optional instructions to guide the animation sequence structure. |
Example Request
{
"init_image": "https://example.com/static-waterfall.jpg",
"prompt": "The water continues to crash downwards aggressively, mist blowing into the camera"
}
Video Response Handling
Unlike older asynchronous architectures, Kryven's video pipeline is heavily optimized and synchronous. Your HTTP request will hold open, and when the task completes (usually within 10 to 45 seconds depending on cluster load), it will return the final MP4 URL directly. You do not need to setup polling webhooks.
{
"created": 1700000045,
"data": [
{
"url": "https://kryven-assets.../generated/video.mp4",
"duration_seconds": 4
}
],
"usage": {
"tokens_used": 30000,
"tokens_remaining": 890500
}
}