← All posts
Tutorial

Add AI to Your App in 60 Seconds — No Prompt Engineering Required

Aaddyy Team
import { AADDYY } from 'aaddyy'
const client = new AADDYY()
const article = await client.articles.generate({ topic: 'AI in Healthcare' })

That's a complete AI article generator. Three lines. No prompt engineering. No model selection. No token math.

This article shows you how to add AI-powered features to any JavaScript/TypeScript app using the AADDYY SDK — with working code you can copy and paste right now.

Before You Start

npm install aaddyy

Get an API key at aaddyy.com/api-keys — takes 30 seconds, gives you 50 free credits (no card needed).

export AADDYY_API_KEY=aip_your_key_here

Example 1: Blog Content Generator

Your marketing team wants AI-generated blog drafts. Here's the entire feature:

import { AADDYY } from 'aaddyy'

const client = new AADDYY()

// Generate a full article
const article = await client.articles.generate({
  topic: 'Remote Work Productivity Tips',
  tone: 'casual',
  length: 'medium'
})

console.log(article)
// Returns: { article: "# Remote Work Productivity Tips\n\n...", wordCount: 850, ... }

Cost: ~5 credits ($0.05).

Need SEO-optimized titles for it?

const titles = await client.titles.seo({
  topic: 'Remote Work Productivity',
  keywords: 'remote work, productivity, WFH',
  count: 5
})
// Returns: { titles: ["10 Remote Work Hacks...", "Why WFH Productivity...", ...] }

Cost: ~1 credit ($0.01).

Example 2: AI Image Generation for Your Product

Your app needs dynamically generated images — product mockups, social media graphics, or hero images:

const image = await client.images.generate({
  prompt: 'modern minimalist office workspace, natural lighting, aerial view',
  style: 'photorealistic',
  num_images: 1
})

console.log(image)
// Returns: { images: [{ url: "https://...", size: "1024x1024" }] }

Cost: ~4 credits ($0.04).

Need a logo instead?

const logo = await client.logos.create({
  keyword: 'NovaTech',
  type: 'modern',
  background: 'transparent'
})
// Returns: { logo: { url: "https://...", width: 1024, height: 1024 } }

Cost: ~4 credits ($0.04).

Example 3: SEO Analyzer for a Marketing Dashboard

Your client wants a dashboard that analyzes any URL for SEO issues:

const analysis = await client.seo.analyze({
  url: 'https://example.com',
  includeBacklinks: true
})

console.log(analysis.overallScore)
// Returns: { total: 85.5, grade: "B+", status: "good" }

console.log(analysis.recommendations[0])
// Returns: { category: "meta", priority: "high", issue: "Missing H1 tag", ... }

Cost: ~10 credits ($0.10). Compare that to Ahrefs at $99/month.

Example 4: AI Math Tutor for an EdTech App

Building a homework helper? One API call:

const solution = await client.math.solve({
  problemText: 'Find the derivative of f(x) = 3x^4 - 2x^2 + 7x - 1',
  explanationLevel: 'step-by-step'
})

// Returns step-by-step solution with formulas
console.log(solution.solution.steps)
// [{ stepNumber: 1, title: "Apply power rule", formula: "d/dx(3x^4) = 12x^3", ... }, ...]
console.log(solution.solution.finalAnswer)
// "f'(x) = 12x^3 - 4x + 7"

Cost: ~1 credit ($0.01).

Physics works the same way:

const physics = await client.physics.solve({
  problemText: 'A ball is thrown upward at 20 m/s. Find maximum height.',
  explanationLevel: 'step-by-step',
  unitsPreference: 'SI'
})

Example 5: Social Media Content Pipeline

Generate content for every platform from a single topic:

const topic = 'Launching our new AI feature'

// LinkedIn post
const linkedin = await client.captions.linkedin({ topic, tone: 'professional' })

// Instagram caption with hashtags
const instagram = await client.captions.instagram({ topic, tone: 'excited' })

// Email announcement
const email = await client.emails.write({
  purpose: `announce ${topic}`,
  tone: 'professional',
  recipientType: 'customers'
})

Three platforms, three API calls, ~10 credits ($0.10) total.

Example 6: Express API Route

Here's how you'd wrap AADDYY in your own API:

import express from 'express'
import { AADDYY } from 'aaddyy'

const app = express()
const ai = new AADDYY()

app.use(express.json())

app.post('/api/generate-article', async (req, res) => {
  try {
    const result = await ai.articles.generate({
      topic: req.body.topic,
      tone: req.body.tone || 'professional',
      length: req.body.length || 'medium'
    })
    res.json({ success: true, data: result })
  } catch (err) {
    if (err.code === 'INSUFFICIENT_CREDITS') {
      res.status(402).json({ error: 'Out of credits', required: err.required })
    } else {
      res.status(500).json({ error: err.message })
    }
  }
})

app.listen(3000)

Error Handling

The SDK throws typed errors you can catch:

import { AADDYY, InsufficientCreditsError, RateLimitError } from 'aaddyy'

try {
  const result = await client.articles.generate({ topic: 'AI' })
} catch (err) {
  if (err instanceof InsufficientCreditsError) {
    console.log(`Need ${err.required}, have ${err.available}`)
    // Redirect user to top-up page
  } else if (err instanceof RateLimitError) {
    // Wait and retry
  }
}

What This Costs

FeatureCreditsUSD
Generate article~5$0.05
Generate image~4$0.04
Generate logo~4$0.04
SEO analysis~10$0.10
Math problem~1$0.01
Title generation~1$0.01
Social caption~1$0.01

New accounts: 50 free credits ($0.50). No card. No subscription.

Next Steps

Explore AI tools on Aaddyy

Browse tools
Add AI to Your App in 60 Seconds — No Prompt Engineering Required | AADDYY | AADDYY Blog | AADDYY - AI Tools Marketplace