Elastic Stack (ELK Stack) ml trained model API

The ml trained model API from Elastic Stack (ELK Stack) — 12 operation(s) for ml trained model.

Business capability
Artificial Intelligence Management BC-610.60

Operations 15

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /_ml/trained_models/{model_id}/deployment/cache/_clear Clear a trained model deployment's inference cache · Clear trained model deployment cache #
Ask an LLM
“Can I clear the inference cache of a deployed model without restarting the deployment?”
“How do I flush cached model responses on every node a model is assigned to?”
Tell an agent
Clear the deployment inference cache for model {model_id}.
Flush cached responses for deployed model {model_id} on all nodes.
GET /_ml/trained_models/{model_id} Get trained model configs by ID · Get trained model configuration info #
Ask an LLM
“What inference config and metadata does a particular trained model have?”
“Can I include the decompressed model definition when fetching a trained model?”
Tell an agent
Show the configuration of trained model {model_id}.
Get trained model {model_id} including {include}.
PUT /_ml/trained_models/{model_id} Upload a trained model · Create a trained model #
Ask an LLM
“How do I bring in a model that wasn't created by data frame analytics?”
“Can I tag a trained model and give it a description when I create it?”
Tell an agent
Create trained model {model_id} with inference config {inference_config}.
Upload model {model_id} of type {model_type} tagged {tags}.
DELETE /_ml/trained_models/{model_id} Delete an unreferenced trained model · Delete an unreferenced trained model #
Ask an LLM
“How do I delete a trained model that no ingest pipeline uses anymore?”
“Can I force-delete a trained model?”
Tell an agent destructive · confirm first
Delete trained model {model_id}.
Force delete the trained model {model_id} within {timeout}.
PUT /_ml/trained_models/{model_id}/model_aliases/{model_alias} Create or reassign a trained model alias · Create or update a trained model alias #
Ask an LLM
“Can I give a trained model a friendly alias to use in inference processors?”
“How do I move an alias from an old model to a newly trained one?”
Tell an agent
Point alias {model_alias} at trained model {model_id}.
Reassign alias {model_alias} to model {model_id}.
DELETE /_ml/trained_models/{model_id}/model_aliases/{model_alias} Delete a trained model alias · Delete a trained model alias #
Ask an LLM
“How do I remove an alias from a trained model?”
“What happens if I delete an alias that points to a different model than the one I name?”
Tell an agent destructive · confirm first
Delete alias {model_alias} from trained model {model_id}.
Remove the model alias {model_alias} that refers to {model_id}.
GET /_ml/trained_models List all trained models · Get trained model configuration info #
Ask an LLM
“What trained models are available on my cluster?”
“Can I list only the trained models with certain tags?”
Tell an agent
List all trained models.
List trained models tagged {tags}.
GET /_ml/trained_models/{model_id}/_stats Get usage stats for specific trained models · Get trained models usage info #
Ask an LLM
“How many inference calls has a specific trained model served?”
“Can I get deployment and ingest stats for a few models using a wildcard?”
Tell an agent
Show usage stats for trained model {model_id}.
Get inference and deployment statistics for models matching {model_id}.
GET /_ml/trained_models/_stats Get usage stats for all trained models · Get trained models usage info #
Ask an LLM
“Which of my trained models are actually being used?”
“Can I see usage statistics across every trained model on the cluster?”
Tell an agent
Show usage stats for all trained models.
Get stats for the first {size} trained models.
POST /_ml/trained_models/{model_id}/_infer Run a trained model on documents · Evaluate a trained model #
Ask an LLM
“Can I test a deployed trained model by sending it a few documents directly?”
“How do I override the inference config when evaluating a trained model on sample docs?”
Tell an agent
Run trained model {model_id} on these documents: {docs}.
Infer {docs} with model {model_id} using config {inference_config}.
PUT /_ml/trained_models/{model_id}/definition/{part} Upload one part of a model definition · Create part of a trained model definition #
Ask an LLM
“How do I upload a large model definition in several chunks?”
“What do I need to tell Elasticsearch about the total parts and total length when uploading a definition piece?”
Tell an agent
Upload part {part} of the definition for model {model_id}.
Store definition chunk {part} of {total_parts} for model {model_id}.
PUT /_ml/trained_models/{model_id}/vocabulary Upload an NLP model's vocabulary · Create a trained model vocabulary #
Ask an LLM
“How do I add the tokenizer vocabulary for an NLP model I uploaded?”
“Can I include BPE merges when storing a trained model vocabulary?”
Tell an agent
Upload vocabulary {vocabulary} for NLP model {model_id}.
Store the vocabulary and merges {merges} for model {model_id}.
POST /_ml/trained_models/{model_id}/deployment/_start Deploy a trained model to ML nodes · Start a trained model deployment #
Ask an LLM
“How do I deploy a trained model so it can serve inference?”
“Can I choose the number of allocations and threads per allocation when starting a deployment?”
Tell an agent
Start a deployment of trained model {model_id}.
Deploy {model_id} with {number_of_allocations} allocations and {threads_per_allocation} threads each.
POST /_ml/trained_models/{model_id}/deployment/_stop Stop a trained model deployment · Stop a trained model deployment #
Ask an LLM
“How do I undeploy a trained model to free up ML node memory?”
“Can I force-stop a model deployment that ingest pipelines still reference?”
Tell an agent
Stop the deployment of trained model {model_id}.
Force stop the deployed model {model_id}.
POST /_ml/trained_models/{model_id}/deployment/_update Scale a trained model deployment · Update a trained model deployment #
Ask an LLM
“Can I change the number of allocations on a model that's already deployed?”
“How do I turn on adaptive allocations for a running model deployment?”
Tell an agent
Scale the deployment of {model_id} to {number_of_allocations} allocations.
Enable adaptive allocations {adaptive_allocations} on deployed model {model_id}.

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/elk-stack:elk-stack-ml-trained-model-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

elk-stack-ml-trained-model-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Elasticsearch Request & Response Specification ml trained…
  license:
    name: Apache 2.0
    url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
  version: ''
tags:


# --- truncated at 32 KB (418 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-ml-trained-model-api-openapi.yml