{"id":1065,"date":"2026-07-06T12:43:34","date_gmt":"2026-07-06T10:43:34","guid":{"rendered":"https:\/\/www.mariusb.net\/blog\/?p=1065"},"modified":"2026-07-06T12:43:34","modified_gmt":"2026-07-06T10:43:34","slug":"ai-api-cheat-sheet","status":"publish","type":"post","link":"https:\/\/www.mariusb.net\/blog\/2026\/07\/ai-api-cheat-sheet\/","title":{"rendered":"API Cheat Sheet"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-large is-resized\"><a href=\"https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat.png?ssl=1\" rel=\"lightbox[1065]\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat.png?resize=1024%2C683&#038;ssl=1\" alt=\"Cartoon illustration titled AI API Cheat Sheet showing a developer using Gemini and Kilo Code to generate curl commands and Rust code while keeping API keys secret.\" class=\"wp-image-1064\" style=\"aspect-ratio:1.4992888417882142;width:298px;height:auto\" srcset=\"https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat.png?resize=1024%2C683&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat.png?resize=300%2C200&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat.png?resize=768%2C512&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat.png?w=1536&amp;ssl=1 1536w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><\/figure>\n<\/div>\n\n\n<div class=\"wp-block-jetpack-markdown\"><h3>Scenario<\/h3>\n<p>You have a specific API you want to use but are not sure about the endpoint, the parameters, or whether it is public (no API key required) or private (requires an API key). All you know is the provider, and maybe you have access to the API docs.<\/p>\n<p>But as all of us know, reading the documents and finding the exact right API call might be hit-and-miss, leaving you experimenting until you find the right one.<\/p>\n<h3>What to do?<\/h3>\n<p>Open your favourite AI client; for me, it is mostly <a href=\"https:\/\/gemini.google.com\/\">Gemini<\/a> or even <a href=\"https:\/\/kilo.ai\">Kilo Code<\/a>, and enter your prompt.<\/p>\n<p>Start by describing how you will use it, as a REST API called via curl, for example or in some programming language, for example, Rust. Specify the provider and what data you want included in the return.<\/p>\n<p>Here is an example of a prompt I gave Gemini:<\/p>\n<blockquote>\n<p>Using the CoinGecko API, give me a curl command to get the BTC price in ZAR on the VALR exchange<\/p>\n<\/blockquote>\n<p>And here is Gemini\u2019s response:<\/p>\n<ul>\n<li>If you are using the CoinGecko Free API Tier, run this command<\/li>\n<\/ul>\n<pre><code class=\"language-bash\">curl -X 'GET' \\\n  'https:\/\/api.coingecko.com\/api\/v3\/exchanges\/valr\/tickers?coin_ids=bitcoin' \\\n  -H 'accept: application\/json'\n<\/code><\/pre>\n<ul>\n<li>If you are using a CoinGecko Pro API Key, use the pro domain and include your API key in the header:<\/li>\n<\/ul>\n<pre><code class=\"language-bash\">curl -X 'GET' \\\n  'https:\/\/pro-api.coingecko.com\/api\/v3\/exchanges\/valr\/tickers?coin_ids=bitcoin' \\\n  -H 'accept: application\/json' \\\n  -H 'x-cg-pro-api-key: YOUR_API_KEY_HERE'\n<\/code><\/pre>\n<p>If you specify a programming language, your response will be much more detailed and will include what libraries or crates, if you use Rust, are dependencies and some skeleton code as a starting point for how to call the API in the language you specified.<\/p>\n<p>I hardly ever read the docs anymore; my AI agents are my go-to at the moment. I only reference the docs when the result is not what I want, and the AI agent clearly went off the boil and cannot come up with the correct answer.<\/p>\n<h2><em>Security Note<\/em><\/h2>\n<p>If and when you use any secure items like API keys. Do not include it in the code that you share; use environment variables that are local and use the keys via the environment variables.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>When unsure about using an API, leverage an AI client to generate the correct endpoint and parameters. Describe the usage and desired data, stating the provider. This method simplifies obtaining accurate curl commands or code samples, reducing reliance on documentation while maintaining security regarding sensitive information like API keys.<\/p>\n","protected":false},"author":1,"featured_media":1063,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"Streamline your development workflow. See how to leverage AI agents to quickly call APIs, format curl commands, and write secure skeleton code.","jetpack_seo_html_title":"AI API Cheat Sheet: Faster Endpoint Discovery with Gemini & Kilo Code","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[193,200,188],"tags":[194,202,189,199],"class_list":["post-1065","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-coding","category-rust","tag-ai","tag-curl","tag-rust","tag-software-development"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.mariusb.net\/blog\/wp-content\/uploads\/2026\/07\/APICheat-2.png?fit=1376%2C768&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1SHVw-hb","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/posts\/1065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/comments?post=1065"}],"version-history":[{"count":2,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/posts\/1065\/revisions"}],"predecessor-version":[{"id":1067,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/posts\/1065\/revisions\/1067"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/media\/1063"}],"wp:attachment":[{"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/media?parent=1065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/categories?post=1065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mariusb.net\/blog\/wp-json\/wp\/v2\/tags?post=1065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}