KRYVEN API Docs
API Integration

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
Access Requirements: API access requires any paid plan (Starter, Pro, Developer, or Unlimited). Free plan users will receive a 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) and kry5.2-extended (higher quality).
  • messages (Required): A non-empty array of message dictionaries comprising the conversation history. Each message must contain a role and content. Ensure at least one message has the role user.
  • max_tokens (Optional, Default: 4000): The maximum number of tokens to generate in the completion.
  • stream (Optional, Default: false): If set to true, the API will return a streaming Server-Sent Event (SSE) response.
Note: Advanced sampling parameters like 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 CodeCause
400 Bad RequestMissing messages array, or content safety violation.
401 UnauthorizedInvalid, missing, or inactive kry_sk_ API key.
402 Payment RequiredInsufficient token balance to cover the generation cost.
403 ForbiddenThe provided API key lacks Developer or high-tier PAYG permissions.
429 Too Many RequestsRate 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

  1. Open Cursor Settings. Go to Cursor Settings → Models (or press Cmd/Ctrl + Shift + J).
  2. Add OpenAI API Key. Under the OpenAI API Key section, enter your Kryven API key (starts with kry_sk_).
  3. Override the Base URL. Toggle Override OpenAI Base URL and enter:
https://kryven.cc/v1
  1. Add a Custom Model. Click + Add Model and enter one of the following model names:
    • kryven-flash — Fast responses, great for quick edits and autocomplete
    • kryven-extended — Higher quality, better for complex reasoning and refactoring
    • kryven-coder — Optimized for code generation and debugging
  2. 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.
Tip: Use 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

  1. Install Cline. Open VS Code, go to the Extensions tab, and search for Cline. Click Install.
  2. 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.
  3. Select OpenAI Compatible as the Provider. In the API Provider dropdown, select OpenAI Compatible.
  4. Configure the Connection. Set the Base URL to:
https://kryven.cc/v1
  1. 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 iteration
    • kryven-extended — Best balance of speed and quality for complex coding tasks
    • kryven-coder — Maximum code quality, optimized for generation and debugging
  2. 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.
Tip: For best results with Cline's autonomous agent features, use 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

  1. Log into your Janitor AI account and enter a chat with a character.
  2. Open the API Settings (usually in the right sidebar or header menu).
  3. Select OpenAI as your API provider.
  4. Input your Kryven Developer API Key into the OpenAI API Key field.
  5. Expand the Reverse Proxy or Custom Endpoint settings.
  6. Check the box to enable the Custom URL.
  7. Enter the following URL exactly as shown:
https://kryven.cc/v1
  1. Check your connection. Janitor AI will now route all LLM generation requests directly through Kryven's servers using our uncensored models.

Setup in SillyTavern

  1. Open SillyTavern and go to the API Connections menu (the plug icon).
  2. Select the Chat Completion API type and choose OpenAI.
  3. Under the API Connection settings, toggle Reverse Proxy.
  4. Set the Proxy URL to https://kryven.cc/v1.
  5. Enter your Kryven AI API key.
  6. Click Connect. The dot should turn green.
Important: If your character cards contain extensive system prompts, they will be combined smoothly with Kryven's root prompt so the character maintains its personality traits flawlessly.

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

ParameterTypeRequiredDescription
promptStringYesThe core description of the image. Be as detailed as possible.
model_typeStringNoMust be either 'advanced' or 'seedream'. Default is 'advanced'.
input_imagesArrayNoArray of up to 2 publicly accessible image URLs or Base64 strings. If populated, the pipeline automatically acts as an img2img modifier.
widthIntegerNoDesired width in pixels (min 256, max 2048). Default 1024.
heightIntegerNoDesired height in pixels (min 256, max 2048). Default 1024.
aspect_ratioStringNoA 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

Video Generation Cost: Generating video requires immense computational overhead. This endpoint costs a flat rate of 30,000 tokens per request. If your account holds less than 30,000 tokens, you will receive a 402 Payment Required error.

Request Body JSON Parameters

ParameterTypeRequiredDescription
init_imageStringYesA publicly accessible URL to the static image you want to animate. Must not be empty.
promptStringNoOptional 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
  }
}