AI Text / prompts endpoint

AI Text / prompts endpoint

AI Text / prompts endpoint

Generate text responses using OpenRouter + Pollinations fallback via the mihajlo.mk API.

AI Text API

Call https://api.mihajlo.mk/v1/ai-text with your token and prompt to receive a safe, cached response. We first try Pollinations and fall back to OpenRouter generations.

Parameters

  • token — copy the token (API Key) from your https://mihajlo.mk account after signing in with Google/Gmail.
  • prompt — text to feed to the model (max 5000 characters).
  • temperature — optional float between 0 and 2; defaults to null.
  • system — optional string that warms up the assistant.
  • tokens — optional integer for max tokens.
POST https://api.mihajlo.mk/v1/ai-text
Content-Type: application/x-www-form-urlencoded

token=YOUR_TOKEN&prompt=Write+an+intro+for+a+smart+home+app&temperature=0.7

The response is cached; repeat prompts return the cached text unless you alter the prompt or metadata.

Sample response:

{
  "error": false,
  "status_text": "OK",
  "status_code": 200,
  "ai-text": {
    "prompt": "Write an intro for a smart home app",
    "response": "Meet HomeSphere, your smart home companion that learns the rhythm of each room, anticipating comfort before you know you need it."
  }
}