overview
meraGPT API
meraGPT serves small models trained for a single job each, over an OpenAI-compatible HTTP API. Usage is metered per token against prepaid USD credit. There is no subscription and no seat count.
The base URL is https://meragpt.com/v1. Two models are available today, each with its own endpoint:
- Restyler 1 (
text-restyler-1) rewrites machine-written prose so it reads as if a person wrote it, at/v1/restyle. - Query Fanout 1 (
query-fanout-1) returns the web searches an AI assistant would run before answering a question, at/v1/fanout.
Quickstart
Three steps, about two minutes. You can skip straight to step three in the playground, which needs no account: the playground.
1. Add credit
Sign in with Google and add credit from the dashboard. The minimum is $10. It is a USD balance, not a token bundle, what you see is what is left.
2. Create a key
On the keys page, name a key and optionally restrict which models it may call and cap what it may spend. The secret is shown once, at creation. We store only a SHA-256 hash, so it cannot be shown again by us or by anyone who reaches our database.
3. Make a request
The Restyler’s task-native endpoint takes a whole document and handles splitting it into the paragraph-sized units the model works on:
curl https://meragpt.com/v1/restyle \
-H "Authorization: Bearer $MERAGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-restyler-1",
"text": "The utilization of our platform facilitates the optimization of workflow efficiency across organizational boundaries."
}'The fan-out takes a question and returns a list of searches:
curl https://meragpt.com/v1/fanout \
-H "Authorization: Bearer $MERAGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "query-fanout-1",
"question": "What are the best project management tools available right now?"
}'Or point an existing OpenAI client at the same base URL and change the model name:
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MERAGPT_API_KEY"],
base_url="https://meragpt.com/v1",
)
resp = client.chat.completions.create(
model="text-restyler-1",
messages=[{"role": "user", "content": draft}],
)
print(resp.choices[0].message.content)Which endpoint to use
Prefer the task-native endpoint for the model you are calling. /v1/restyle splits your document, skips what should not be rewritten, reassembles the result with your formatting intact, and tells you per block what it did. /v1/fanout returns the searches as a real array and takes the optional brand hint.
/v1/chat/completions exists so existing OpenAI code works unchanged. The model you name selects which of the two behaviours runs. It does the same work internally, but the chat envelope cannot express the per-block detail or the query list without an extension, and sampling parameters are accepted and ignored because decoding is fixed per model.
Where to go next
- Authentication, keys, model restrictions and per-key spend caps.
- Restyle, the Restyler’s endpoint, in full.
- Fanout, the query fan-out endpoint, in full.
- Chat completions, the compatibility layer and exactly where it differs.
- Models, the catalogue, pricing and limits.
- Errors and limits, status codes, rate limits and what to retry.