Backend & SDK

AI (m77.ai)

Add AI features to your app with one line.

m77.ai.chat runs a chat completion with Maker77 AI. Each call uses 3 integration credits from the app owner's plan.

const reply = await m77.ai.chat('Write a friendly welcome message for a bakery');

const answer = await m77.ai.chat(
  [{ role: 'user', content: 'What should I cook tonight?' }],
  { system: 'You are a helpful chef. Keep answers under 80 words.' }
);

Structured JSON

Pass json: true to get parsed JSON back:

const ideas = await m77.ai.chat(
  'Suggest 3 recipes using eggs, spinach and feta. Return {"recipes":[{"title","minutes","steps":[]}]}',
  { json: true }
);
ideas.recipes.forEach(r => console.log(r.title));

Good to know

  • Up to 20 messages of history per call.
  • Rate limited to protect your credits (30 calls per minute per visitor).
  • If the app owner runs out of integration credits, calls fail with status 402.