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.

API Integration

Harness Kryven AI models in your own applications.

The Power of Kryven API

The Kryven AI API empowers developers to integrate our high-performance 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": "kryven-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: kryven-flash): The identifier of the Kryven model you wish to use. Available models: kryven-flash (fast, default) and kryven-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.

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 an OpenAI-compatible backend for third-party chat frontends.

Using Kryven as a Proxy Backend

Because Kryven is fully OpenAI-compatible, it is commonly used as a drop-in replacement reverse proxy for OpenAI-compatible clients such as 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 completion requests directly through Kryven's servers.

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

Image and video generation has been retired.

Media generation has been retired. Kryven's API provides text and code completions only. There are no image or video generation endpoints.