Change the wording, keep your experiment. Saved in this browser when storage is available.
The question to explore
Ask for a dog photo
What happens when a photo request works, or fails?
About 10 minutes / Suggested pace / No account needed
Try the experimentWhat this activity helps you do
Switch between a photo address and an error. Decide what the app can honestly show after each reply. Use the same check when an AI assistant says a tool succeeded.An app can use another service only if it understands the reply. Switch between a photo address and an error, then decide what to show the user. Apply the same check when an AI assistant says a tool completed a task.
Local teaching illustration / No AI model call
- Choose Success: photo address returned.
- Read the response, then choose Not found: unknown breed. Notice that no photo address comes back.
- Explain why a program should show the error or offer a retry instead of claiming it found a photo.
Written example only. The photo address is illustrative; this page does not fetch it. Open the Dog lab for a real API call.
HTTP 200
{ "status": "success", "message": "https://images.dog.ceo/breeds/beagle/example.jpg" }Change a control to explore the example when JavaScript is enabled.
The idea
An API is a way for one program to ask another for something. A tool is a function an assistant or program can use. Calling an API is one possible tool action.You ask an app for a dog photo. It sends a request to a service, which sends something back. The API defines how the app asks and how it reads the reply. A tool is a function available to a program or agent; calling an API is one thing a tool can do.
These replies are written examples, not live requests. One contains a pretend photo address; the other reports a missing breed. Read the reply before claiming success. The Dog lab makes a real request.Choose a response in the experiment. The successful example includes a photo address. The failed example says the breed was not found. These are written examples, including an illustrative image address. Nothing is fetched here. Open the Dog lab for a real photo request and a walkthrough of the steps.
Take this with you
What changed?
A request is an attempt. Read the response to find out what actually happened.
Try explaining it.
Can an AI assistant honestly say it found a photo if its tool returned an error?
Open a possible explanation
No. It should explain the failure and offer a useful next step. A fluent answer cannot substitute for a missing result.
Choose what to try next
Keep exploring, or stay here and try another variation.