Class 9 Computer Science — Complete notes in English and Urdu
Understanding an AI API is easy if we think of it like a restaurant. Imagine you are a customer who wants to eat a meal. You don't go into the kitchen and cook yourself. Instead, you look at the menu (the API documentation), place an order (send a request), and the kitchen (the AI system) prepares your food. Then the waiter (the API) brings your meal to you (the response). You don't need to know how the food was made — you just enjoy the result. Similarly, an AI API lets you use AI services without building the AI yourself. You send a request (order) and get a response (food) quickly and easily.
AI API کو سمجھنا آسان ہے اگر ہم اسے ایک ریسٹورنٹ کی طرح سوچیں۔ تصور کریں کہ آپ ایک گاہک ہیں جو کھانا کھانا چاہتا ہے۔ آپ باورچی خانے میں جا کر خود کھانا نہیں پکاتے۔ اس کے بجائے، آپ مینو (API دستاویزات) دیکھتے ہیں، ایک آرڈر دیتے ہیں (درخواست بھیجتے ہیں)، اور باورچی خانہ (AI سسٹم) آپ کا کھانا تیار کرتا ہے۔ پھر ویٹر (API) آپ کا کھانا آپ تک پہنچاتا ہے (جواب)۔ آپ کو یہ جاننے کی ضرورت نہیں ہے کہ کھانا کیسے بنایا گیا — آپ صرف نتیجہ سے لطف اندوز ہوتے ہیں۔ اسی طرح، ایک AI API آپ کو AI سروسز کو خود AI بنائے بغیر استعمال کرنے کی اجازت دیتا ہے۔ آپ ایک درخواست (آرڈر) بھیجتے ہیں اور تیزی سے اور آسانی سے جواب (کھانا) حاصل کرتے ہیں۔
| Restaurant Part | AI API Part | Explanation |
|---|---|---|
| Customer | Developer / User | The person who wants to use the AI service |
| Menu | API Documentation | Lists what services are available and how to use them |
| Order | API Request | The message sent to the AI asking for a task |
| Kitchen | AI System | The system that processes the request and does the work |
| Chef | AI Model | The AI model that performs the actual task (e.g., text generation) |
| Waiter | API | Transports the request to the AI and brings back the response |
| Meal | API Response | The result returned to the user (e.g., generated text, image) |
| ریسٹورنٹ کا حصہ | AI API کا حصہ | وضاحت |
|---|---|---|
| گاہک | ڈویلپر / صارف | وہ شخص جو AI سروس استعمال کرنا چاہتا ہے |
| مینو | API دستاویزات | فہرست بناتا ہے کہ کون سی خدمات دستیاب ہیں اور انہیں کیسے استعمال کریں |
| آرڈر | API درخواست | AI کو کام کرنے کے لیے بھیجا گیا پیغام |
| باورچی خانہ | AI سسٹم | وہ نظام جو درخواست پر کارروائی کرتا ہے اور کام کرتا ہے |
| باورچی | AI ماڈل | AI ماڈل جو اصل کام انجام دیتا ہے (مثال: متن کی تخلیق) |
| ویٹر | API | درخواست کو AI تک پہنچاتا ہے اور جواب واپس لاتا ہے |
| کھانا | API جواب | صارف کو واپس کردہ نتیجہ (مثال: تخلیق شدہ متن، تصویر) |