Templates · Example Payload

Templates Mustache Api Example

Example of a Mustache template variable context for generating an OpenAPI-based REST API client

TemplatesAPI DesignCode GenerationDocumentationOpenAPIAsyncAPI

Templates Mustache Api Example is an example object payload from Templates, with 5 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

descriptionenginetemplateFilecontextrenderedOutput

Example Payload

templates-mustache-api-example.json Raw ↑
{
  "description": "Example of a Mustache template variable context for generating an OpenAPI-based REST API client",
  "engine": "mustache",
  "templateFile": "api-client.mustache",
  "context": {
    "apiName": "PetStore API",
    "packageName": "petstore-client",
    "version": "1.0.0",
    "baseUrl": "https://api.petstore.example.com/v1",
    "authType": "bearer",
    "operations": [
      {
        "operationId": "listPets",
        "method": "GET",
        "path": "/pets",
        "summary": "List Pets",
        "returnType": "Pet[]"
      },
      {
        "operationId": "createPet",
        "method": "POST",
        "path": "/pets",
        "summary": "Create Pet",
        "returnType": "Pet"
      }
    ]
  },
  "renderedOutput": "// Auto-generated by OpenAPI Generator\nexport class PetStoreApiClient {\n  private baseUrl = 'https://api.petstore.example.com/v1';\n\n  async listPets(): Promise<Pet[]> {\n    const response = await fetch(`${this.baseUrl}/pets`);\n    return response.json();\n  }\n\n  async createPet(pet: Pet): Promise<Pet> {\n    const response = await fetch(`${this.baseUrl}/pets`, {\n      method: 'POST',\n      body: JSON.stringify(pet)\n    });\n    return response.json();\n  }\n}"
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/templates-mustache-api-example"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.