Any LLM API: AI Text Generation

Generate text with Any LLM via the Muapi REST API. Pay per generation — no subscription needed.

Any LLM API Reference

Endpoint

POST https://api.muapi.ai/api/v1/any-llm-models

Submit a job with your MuApi API key in the x-api-key header, then poll https://api.muapi.ai/api/v1/predictions/{request_id}/result until status is completed.

Parameters

NameTypeRequiredDescription
promptstringYesThe prompt to generate the response
system_promptstringNoSystem prompt to provide context or instructions to the model.
modelstringNoName of the model to use. Premium models are charged at 10x the rate of standard models, they include: deepseek/deepseek-r1, google/gemini-pro-1.5, openai/gpt-4.1, anthropic/claude-3-5-haiku, openai/gpt-4o, anthropic/claude-3.5-sonnet, openai/o3, meta-llama/llama-3.2-90b-vision-instruct, anthropic/claude-3.7-sonnet, openai/gpt-5-chat.Options: anthropic/claude-3.7-sonnet, anthropic/claude-3.5-sonnet, anthropic/claude-3-haiku, google/gemini-2.5-flash, google/gemini-2.0-flash-001, google/gemini-2.0-flash-lite-001, google/gemini-2.5-flash-preview-09-2025, google/gemini-2.0-flash-exp:free, google/gemini-2.5-pro, openai/gpt-4o, openai/gpt-4.1, openai/gpt-5-chat, meta-llama/llama-3.2-90b-vision-instruct, meta-llama/llama-4-maverick, meta-llama/llama-4-scoutDefault: "google/gemini-2.5-flash"
reasoningbooleanNoShould reasoning be the part of the final answer.Default: false
prioritystringNoThroughput is the default and is recommended for most use cases. Latency is recommended for use cases where low latency is important.Options: throughput, latencyDefault: "throughput"
temperatureintNoThis setting influences the variety in the model’s responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input.Default: 1
max_tokensintNoThis sets the upper limit for the number of tokens the model can generate in response. It won’t produce more than this limit. The maximum value is the context length minus the prompt length.Default: null

cURL example

REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/any-llm-models \
  -H "x-api-key: $MUAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"<prompt>"}' | jq -r .request_id)

curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY"

Python example

import os, time, requests

API = "https://api.muapi.ai/api/v1"
headers = {"x-api-key": os.environ["MUAPI_API_KEY"]}

r = requests.post(f"{API}/any-llm-models", headers=headers, json={"prompt":"<prompt>"})
request_id = r.json()["request_id"]

while True:
    res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json()
    if res["status"] == "completed":
        print(res["outputs"]); break
    if res["status"] == "failed":
        raise RuntimeError(res.get("error"))
    time.sleep(3)

Full docs and agent/MCP integration: llms.txt. Get an API key at muapi.ai/access-keys.