Package 'kavel'

Title: Generate AI Images with No API Key
Description: A small client for the Kavel AI image service <https://www.kavel.ai>. Without a key it uses the anonymous free tier, so the first call works on a machine with nothing configured. With an API key every call runs on your kavel.ai account.
Authors: Kavel [aut, cre]
Maintainer: Kavel <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-10-02 07:09:58 UTC
Source: https://github.com/hanshs474/kavel-r

Help Index


Free allowance for a fresh anonymous client id

Description

Free allowance for a fresh anonymous client id

Usage

kavel_credits()

Value

A list with remaining and grant. Free to call.


Edit an existing image

Description

An edit costs more than the free allowance, so without a key this signals a kavel_quota condition before anything is charged.

Usage

kavel_edit(
  source_url,
  instruction,
  api_key = NULL,
  model = NULL,
  poll_seconds = 5,
  timeout_seconds = 360
)

Arguments

source_url

A publicly reachable http(s) url.

instruction

What to change. Say what must stay as well.

api_key

Optional key from https://www.kavel.ai/settings/apikeys.

model

Engine override, honoured only with a key.

poll_seconds

How often the job is polled.

timeout_seconds

Deadline for the whole call.

Value

A list with url and watermarked.


Generate an image from a prompt

Description

Calls the free anonymous tier of Kavel unless an API key is given or KAVEL_API_KEY is set.

Usage

kavel_generate(
  prompt,
  aspect_ratio = "1:1",
  api_key = NULL,
  model = NULL,
  poll_seconds = 5,
  timeout_seconds = 360
)

Arguments

prompt

What to draw. Naming the light, the material and the composition moves the result far more than adding adjectives.

aspect_ratio

One of "1:1", "16:9", "9:16", "4:3", "3:4".

api_key

Optional key from https://www.kavel.ai/settings/apikeys.

model

Engine override, honoured only with a key.

poll_seconds

How often the job is polled.

timeout_seconds

Deadline for the whole call.

Value

A list with url (a permanent CDN link) and watermarked.

Examples

## Not run: 
kavel_generate("matte black ceramic mug on pale oak, soft window light")

## End(Not run)