โ† Home/API Reference

KardKit AI API

Integrate the wisdom of the ancients into your own creations. RESTful API with JSON responses.

Base URL

https://yourdomain.com/api/v1

๐Ÿ”‘ Authentication

All API endpoints require authentication via an API key. Include your key in the Authorization header as a Bearer token.

http
POST /api/v1/chat
Authorization: Bearer kk_your_api_key_here
Content-Type: application/json

โš ๏ธ Security: Never expose your API key in client-side code. Always call the API from a secure server environment.

๐Ÿค– Available Models

Model IDProvider
gpt-4OpenAI
gpt-4oOpenAI
geminiGoogle
gemini-flashGoogle
claudeAnthropic
claude-sonnetAnthropic
POST/api/v1/chat

Send messages to any supported AI model and receive a response.

Request Parameters

ParameterTypeRequiredDescription
modelstringOptionalModel ID. Options: gpt-4, gpt-4o, gemini, gemini-flash, claude, claude-sonnet. Default: gpt-4
messagesarrayRequiredArray of message objects with role (user|assistant|system) and content fields.

Request

json
{
  "model": "gpt-4",
  "messages": [
    { "role": "user", "content": "Hello! Explain the Iliad in 3 sentences." }
  ]
}

Response

json
{
  "id": "kardkit-abc12345",
  "object": "chat.completion",
  "model": "gpt-4",
  "choices": [
    {
      "message": {
        "role": "assistant",
        "content": "The Iliad is an ancient Greek epic poem..."
      },
      "finish_reason": "stop",
      "index": 0
    }
  ]
}
POST/api/v1/images

Generate images from text prompts using DALL-E 3.

Request Parameters

ParameterTypeRequiredDescription
promptstringRequiredText description of the image you want to generate. Be specific for best results.

Request

json
{
  "prompt": "A majestic owl perched on an ancient Greek column at sunset"
}

Response

json
{
  "images": ["https://cdn.openai.com/...image.png"],
  "prompt": "A majestic owl...",
  "model": "dall-e-3"
}

โšก Rate Limits

PlanChatImagesAPI Access
Free (Agora)20/day5/dayNone
Scholar ($9.99/mo)150/day40/day1 key ยท 10K calls/mo
Oracle ($29.99/mo)Unlimited150/day5 keys ยท 100K calls/mo

โš ๏ธ Error Codes

200Success โ€” request was processed correctly
400Bad Request โ€” missing or invalid parameters
401Unauthorized โ€” invalid or missing API key
403Forbidden โ€” your plan doesn't support this feature
429Too Many Requests โ€” daily limit exceeded, upgrade your plan
500Internal Server Error โ€” something went wrong on our end

Ready to Build?

Get your API key from the dashboard and start building.

Get API Key โ†’