Discover/Mastra API
live

Mastra APImastra.ai

Query Mastra's AI model registry via 2 endpoints. List all providers with model counts, or fetch per-provider model capabilities, context windows, and pricing.

This API takes change requests — .
Endpoint health
verified 3h ago
list_providers
get_provider_models
2/2 passing latest checkself-healing
Endpoints
2
Updated
4h ago

What is the Mastra API?

The Mastra.ai API provides structured access to Mastra's AI model registry through 2 endpoints, covering every provider and model listed at mastra.ai/models/providers. The list_providers endpoint returns all available AI providers in a single call, including name, URL slug, and total model count per provider. The get_provider_models endpoint drills into a specific provider to return model-level details including capability flags, context window size, and pricing data.

This call costs1 credit / call— charged only on success
Try it

No input parameters required.

api.parse.bot/scraper/c605deea-235c-46a1-a123-3618a500b89e/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/c605deea-235c-46a1-a123-3618a500b89e/list_providers' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace mastra-ai-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: Mastra AI — browse providers and drill into model capabilities."""
from parse_apis.mastra_ai_api import MastraAI, InputFormatInvalid

client = MastraAI()

# List available providers with their model counts.
for summary in client.provider_summaries.list(limit=5):
    print(summary.name, f"({summary.model_count} models)")

# Drill into the first provider to see its full model catalog.
provider_summary = client.provider_summaries.list(limit=1).first()
if provider_summary is not None:
    provider = provider_summary.details()
    print(f"\n{provider.name}: {provider.description}")
    print(f"Total models: {provider.total_models}")

    for model in provider.models[:3]:
        print(f"  {model.model_id} | tools={model.supports_tools} reasoning={model.supports_reasoning}")

# Point lookup by slug discovered from the listing above.
if provider_summary is not None:
    try:
        detail = client.providers.get(slug=provider_summary.slug)
        print(f"\nDirect get: {detail.name} — {detail.total_models} models")
    except InputFormatInvalid as e:
        print(f"Invalid provider slug: {e.message}")

print("\nexercised: provider_summaries.list / details / providers.get")
All endpoints · 2 totalmissing one? ·

List all AI model providers available on Mastra. Returns each provider's name, URL slug, and total model count. No pagination; all providers are returned in a single call.

Input

No input parameters required.

Response
{
  "type": "object",
  "fields": {
    "total": "integer total number of providers",
    "providers": "array of provider objects with name, slug, and model_count"
  },
  "sample": {
    "data": {
      "total": 166,
      "providers": [
        {
          "name": "OpenAI",
          "slug": "openai",
          "model_count": 47
        },
        {
          "name": "Anthropic",
          "slug": "anthropic",
          "model_count": 13
        },
        {
          "name": "Google",
          "slug": "google",
          "model_count": 39
        }
      ]
    },
    "status": "success"
  }
}

About the Mastra API

Provider Directory

The list_providers endpoint returns a flat list of all AI model providers indexed by Mastra, with no pagination required. Each entry in the providers array includes a name (display label), slug (used as the provider_slug input to the second endpoint), and model_count (total number of models that provider exposes). The top-level total field gives the aggregate count of providers in a single integer.

Per-Provider Model Details

The get_provider_models endpoint accepts a provider_slug string — obtained directly from list_providers results — and returns a full model catalog for that provider. The response includes provider_name, provider_slug, description (a short text summary of the provider), and total_models. Each object in the models array carries capability flags for tools support, reasoning, image, audio, and video, alongside the model's context window size and its pricing.

Capability Flags and Pricing Fields

The capability fields on each model object make it straightforward to filter for models that support a specific modality — for example, filtering on the image flag to find vision-capable models, or the reasoning flag for models with explicit chain-of-thought capabilities. Pricing data is returned per model, which allows direct cost comparisons across providers without needing to visit each provider's documentation separately.

Data Scope

Coverage reflects the providers and models listed in Mastra's public model registry. Slugs like openai, anthropic, and google are explicitly cited as example values for provider_slug, indicating broad coverage of major LLM providers. The registry is queried as-is; any provider or model not present in Mastra's index will not appear in results.

Reliability & maintenanceVerified

The Mastra API is a managed, monitored endpoint for mastra.ai — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when mastra.ai changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official mastra.ai API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3h ago
Latest check
2/2 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a model comparison tool that surfaces context window sizes and pricing across multiple providers using get_provider_models.
  • Filter for audio- or video-capable models by checking capability flags returned in the models array.
  • Enumerate all providers via list_providers to power a dropdown or autocomplete in an AI playground UI.
  • Track how many models each provider exposes over time using the model_count field from list_providers.
  • Identify which providers offer reasoning-capable models by iterating get_provider_models results and checking the reasoning flag.
  • Generate a cost matrix across providers and models by aggregating the pricing field from multiple get_provider_models calls.
  • Validate that a given model slug exists under a provider before dispatching inference requests in a routing layer.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Mastra have an official developer API for its model registry?+
Mastra does not publish a documented public REST API for its model registry data. The data is available through the Mastra.ai website at mastra.ai/models/providers.
What does `get_provider_models` return beyond a list of model names?+
Each model object includes five capability flags (tools, reasoning, image, audio, video support), a context window size, and pricing. The response also includes a short description of the provider and a total_models count.
Does `list_providers` paginate results?+
No. All providers are returned in a single call. The total field at the top level tells you how many provider objects are in the providers array, and no page or offset parameters are accepted.
Can I search or filter models by capability directly in the API, rather than client-side?+
Not currently. Both endpoints return full result sets without server-side filtering by capability flags or modality. Filtering on fields like reasoning or image must be done on the returned data. You can fork this API on Parse and revise it to add a filtering endpoint that accepts capability flags as query parameters.
Does the API expose historical pricing changes or model deprecation status?+
Not currently. The API returns the current state of each provider's model catalog, including present pricing, but no historical snapshots or deprecation flags are included in the response schema. You can fork it on Parse and revise to add an endpoint that tracks or stores pricing over time.
Page content last updated . Spec covers 2 endpoints from mastra.ai.
Related APIs in Developer ToolsSee all →
artificialanalysis.ai API
Compare and rank LLM models and providers across performance benchmarks, then dive into detailed specifications for any model to find the best fit for your needs. Discover performance metrics for specialized AI systems handling speech, images, and video, plus benchmark data for different hardware configurations.
openai.com API
Access data from openai.com.
ollama.com API
Search and discover AI models from Ollama's library, finding specific variants, their sizes, context windows, and ready-to-use pull commands. Get detailed information about any model to quickly understand its capabilities and requirements before running it locally.
agent.ai API
Search and discover AI agents in the Agent.ai marketplace by filtering through categories and tags, then view detailed agent information and builder profiles. Find the perfect AI solution for your needs by browsing available agents, exploring builder credentials, and comparing agent capabilities across different categories.
lmarena.ai API
lmarena.ai API
toolify.ai API
Search and browse premium .ai domain names available on the Toolify marketplace, filtering by keywords, categories, prices, and domain attributes to find the perfect domain for your project. Explore curated domain listings organized by category to discover valuable .ai domains suited to your needs.
developers.openai.com API
Check current pricing for all OpenAI models including GPT, image generation, audio, video, embeddings, and fine-tuning across different pricing tiers like Batch, Flex, Standard, and Priority. Get real-time cost information to compare rates and plan your API spending.
theresanaiforthat.com API
Search and discover AI tools across different tasks, get detailed information about specific tools, browse available deals, and stay updated on the latest tools. Find the perfect AI solution for your needs by filtering by task category or checking featured and trending tools.