Skip to main content
AIDevOps
  • Learn
  • Learning Paths
  • Practice
  • Open Source
  • Books
  • Engineering

    AI DevOpsThe full map of building and operating AI servicesLLMOpsLLM deployment ยท evaluation ยท observabilityHands-on ProjectsBuild AI Agent projects

    Knowledge

    DocsTechnical documentationBlogEngineering articlesPloggerDevelopment log feed

    Validate

    Certification3-level skills certification ยท coming soon
AI Models
LlamaTutorial|MistralTutorial|GemmaTutorial|DeepSeekTutorial|QwenTutorial
๐Ÿง  AI Core
AI Intro & RoadmapML FundamentalsLLM Fundamentals|Python AIC++|PyTorchTensorFlowJAX
๐Ÿค– AI Applied Development
Applied AI Intro & RoadmapHugging FaceLangChainLlamaIndexLLMOps|LangGraphMCPMulti-AgentAgent Evaluation
๐Ÿง  AI Agent Development
Finance AI AgentLLM API ServerStock Investing AgentAIOps AI AgentEducation AI AgentCoding AI Agent
๐ŸŒฑ Spring Cloud
Spring Intro & RoadmapSpring Cloud GatewaySpring BootJava|Spring AISpring SecuritySpring BatchSpring JPA
๐Ÿณ DevOps
DevOps Intro & RoadmapLinuxDockerCI/CD|Kubernetes BasicsK8s AdvancedPrometheusGrafana
๐Ÿงฑ Infrastructure
Infrastructure Intro & RoadmapNginxRedis
โ˜๏ธ Cloud
Cloud Intro & RoadmapAWSGCPAzureNCPCloudflare
๐ŸŽจ Frontend
Frontend Intro & RoadmapJavaScriptTypeScript|ReactNext.js|VueNuxt|Electron
๐Ÿ“ฑ Mobile
Mobile Intro & RoadmapKotlinAndroidFlutter
โš™๏ธ Backend
Backend Intro & RoadmapPython BasicsFastAPIDjangoFlask|CGoGinNode.js
๐Ÿ’พ Database
DB Intro & RoadmapCore SQLOracleMySQLPostgreSQL|MongoDBVector DB
๐Ÿงช Testing
k6JMeternGrinder
AIDevOps

Engineering AI. From Code to Production.
An engineering learning platform for building and operating AI and AI Agents

Learn

  • All Guides
  • Learning Paths
  • AI Tutorial
  • Practice
  • Books

Resources

  • AI DevOps
  • LLMOps
  • Hands-on Projects
  • Docs
  • Blog
  • Plogger
  • Open Source
  • Certification (coming soon)

Start Here

  • AI Core Roadmap
  • AI Applied Development Roadmap
  • Spring Cloud Roadmap
  • DevOps Roadmap
  • Infrastructure Roadmap

ย 

  • Cloud Roadmap
  • Frontend Roadmap
  • Mobile Roadmap
  • Backend Roadmap
  • Database Roadmap
ยฉ 2026 AIDevOps. All rights reserved.
Terms of ServicePrivacy PolicySitemaptestforge.kr
  1. Home
  2. AI Tutorial
  3. The Lantern's Door

Quest 07 ยท Developers

The Lantern's Door

Visitors

Calling an AI from your own program through an API

Time
6 min
Max XP
100
Skill earned
Calling an AI through an API
1 / 5
0 XP

Automatic summaries

Hanna

Dozens of posts go up on the notice board every day. It would be great to summarize the new ones each night and send them to the guild members in the morning.

You

Then instead of me pasting into Ari every night, a program should call Ari directly.

Ari

Right. A program calls me through "the lantern's door", an API. Opening the door takes a key (an API key), and each call costs as much as the amount of text used.

Summary

What this request teaches

What do you need to know to call an AI from your own program instead of a chat window? Through building a notice-board summary feature, learn how to protect an API key, how to separate system instructions, and how to handle failures and cost.

Show the key points (best read after finishing the request)
  • A program calls an AI through an API. Each call costs according to the input and output tokens.
  • Keep API keys only in server environment variables or a secrets manager, never in browser code or a repository.
  • If a key leaks or enters a repository, revoke it immediately and issue a new one.
  • Put the role and rules in the system instructions and each call's material in the user message, and you can expect the same quality every time.
  • Calls to an outside API need a time limit, retries with growing waits, a cap on attempts, and logging plus alerts on failure.

Try it yourself

If you are building a feature that uses an API, describe only the structure, without the code, and ask an AI to review it as below.

The feature I am building is [what], and the structure is [how the browser, server, and AI API connect].
Review the five points below. Mark each as "fine / risky / needs checking".
1. Where the API key lives
2. Retries and time limits on failure
3. How much text is sent per call, and the cost
4. Places where user input goes to the AI as is
5. Who finds out about failures, and how

Learn more

  • FastAPI โ€” building an API server that calls an AI โ†’
  • LLMOps โ€” deploying and running AI services โ†’
  • Back to the request board โ†’