AI Gateway Labs is a collection of hands-on examples for using an AI gateway built with Azure API Management and Microsoft Foundry to manage AI models, tools, and agents. Developers use the labs to explore policies for security, request routing, monitoring, caching, and cost control, with notebooks and deployable infrastructure templates. The catalogue entries provide skills and instructions for working through these gateway examples.
Borrowing it
Nothing to install: this file belongs to Azure-Samples/AI-Gateway. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Azure-Samples/AI-Gateway/main/.github/skills/apim-bicep/SKILL.mdgit clone --depth 1 https://github.com/Azure-Samples/AI-GatewayWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/azure-samples/ai-gateway/apim-bicep)<a href="https://agentmods.dev/skills/azure-samples/ai-gateway/apim-bicep"><img src="https://agentmods.dev/badge/skills/azure-samples/ai-gateway/apim-bicep/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/azure-samples/ai-gateway/apim-bicep"><img src="https://agentmods.dev/badge/skills/azure-samples/ai-gateway/apim-bicep.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00086 | $0.02536 |
| Opus 5.5 | $0.00034 | $0.01014 |
| Sonnet 5.5 | $0.00017 | $0.00507 |
| Haiku 4.5 | $0.00009 | $0.00254 |
Grade A, and why
apim-bicep scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 378 lines — stays where its author put it; the contents beside it link to each section on GitHub.
APIM Bicep
This skill provides guidance for creating Azure Bicep templates for API Management and related services.
Quick Start - Basic APIM Instance
@description('The name of the API Management service instance')
param apiManagementServiceName string = 'apim-${uniqueString(resourceGroup().id)}'
@description('The email address of the publisher')
param publisherEmail string
@description('The name of the publisher')
param publisherName string
@description('The pricing tier of this API Management service')
@allowed(['Consumption', 'Developer', 'Basic', 'Basicv2', 'Standard', 'Standardv2', 'Premium'])
param sku string = 'Basicv2'
@description('Location for all resources')
param location string = resourceGroup().location
resource apimService 'Microsoft.ApiManagement/service@2024-06-01-preview' = {
name: apiManagementServiceName
location: location
sku: {
name: sku
capacity: 1
}
identity: {
type: 'SystemAssigned'
}
properties: {
publisherEmail: publisherEmail
publisherName: publisherName
}
}
output apimId string = apimService.id
output apimName string = apimService.name
output gatewayUrl string = apimService.properties.gatewayUrl
output principalId string = apimService.identity.principalId
Resource Types Reference
| Resource Type | API Version | Purpose |
|---|---|---|
Microsoft.ApiManagement/service |
2024-06-01-preview |
APIM service instance |
Microsoft.ApiManagement/service/apis |
2024-06-01-preview |
API definitions |
Microsoft.ApiManagement/service/apis/operations |
2024-06-01-preview |
API operations |
Microsoft.ApiManagement/service/apis/policies |
2024-06-01-preview |
API-level policies |
Microsoft.ApiManagement/service/backends |
2024-06-01-preview |
Backend services |
Microsoft.ApiManagement/service/subscriptions |
2024-06-01-preview |
API subscriptions |
Microsoft.ApiManagement/service/products |
2024-06-01-preview |
API products |
Microsoft.ApiManagement/service/loggers |
2024-06-01-preview |
Logging configuration |
Microsoft.ApiManagement/service/apis/diagnostics |
2024-06-01-preview |
API diagnostics |
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 378 lines · 86 tokens per session scan A 0340aa9c7661
apim-bicep is a skill published in the GitHub repository Azure-Samples/AI-Gateway (1,008 stars, last pushed yesterday), licensed MIT. It adds 86 tokens to every session and 2,536 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
apim-bicep compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| apim-bicepAzure-Samples/AI-Gateway | Skill | 1.0k | yesterday | MIT | A | 86 | Claude Code, Codex |
| azure-eventhub-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 94 | Claude Code |
| azure-mgmt-apimanagement-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 97 | Claude Code |
| azure-mgmt-botservice-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 78 | Claude Code |
| azure-servicebus-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 86 | Claude Code |
| python-appservice-deploymicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 81 | Claude Code |
| azure-maps-search-dotnetmicrosoft/skills | Skill | 3.2k | yesterday | MIT | A | 91 | Claude Code |