API
OpenAI-compatible private inference. Change the base URL, keep your client. GLM-5.3 and Qwen-3.8 on our own GPUs, with no logs.
Get a keyBearer-token auth. Get your key on the account page.
Old sk- keys are deprecated and work only through https://ghostmetal.io/api/gw/v1. Create a gm1_ key on the account page and switch to the address above.
Image API
Paid accounts: POST /v1/images/generations (JSON) and POST /v1/images/edits (multipart image + prompt). Temporary price: 1 credit per output image; n: 1–3, steps: 1–60. PNG URLs require authentication and expire after 15 minutes. Use response_format=b64_json for embedded output, or DELETE /v1/images/files/{image_id} after downloading a URL. POST /v1/images/quote returns the price before generation; available sizes are in /v1/models → image_formats.
curl https://api.ghostmetal.io/v1/images/generations -H "Authorization: Bearer $GHOSTMETAL_KEY" -H "Content-Type: application/json" -d '{"model":"qwen-image-2.1","prompt":"A watercolor fox","size":"1024x1024","n":1,"negative_prompt":"blur"}'negative_prompt works only when true_cfg_scale > 1. If a nonempty negative_prompt is provided without true_cfg_scale, it defaults to 2. Explicit true_cfg_scale=1 is preserved. Both parameters remain available in the API.
Chat completions
POST /v1/chat/completions — streaming (SSE) and non-streaming, OpenAI-compatible.
from openai import OpenAI
client = OpenAI(
base_url="https://api.ghostmetal.io/v1",
api_key="YOUR_GHOSTMETAL_KEY",
)
stream = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Write a streaming API client in Python"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="")Speech API
POST /v1/audio/speech Generate audio for a paid account. Requests are free and counted in usage; the model must be enabled and its backend configured. Trial accounts can use browser speech.
curl https://api.ghostmetal.io/v1/audio/speech \
-H "Authorization: Bearer $GHOSTMETAL_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"piper","input":"Привет, мир!","voice":"alloy","response_format":"opus","normalization":"ru"}' \
--output speech.ogginput: up to 5,000 characters; voice: accepted and ignored (one female voice); response_format: opus (Ogg/Opus), mp3 (default), or wav; speed: 0.5–2. Each request is read in one voice: English words are spoken in Russian with at least as many Cyrillic as Latin letters. Russian text is always normalized (numbers, units, English terms); the optional normalization field (none, ru, ru_translit) is accepted for compatibility.
The response contains audio bytes. One request per account runs at a time in each gateway process; a new waiting request replaces the previous one. This endpoint supports a subset of the OpenAI API.
Models & pricing
| Model | Notes | $/M in | $/M out |
|---|---|---|---|
| glm-5.3 | flagship · 256K | $0.50 | $2.50 |
| glm-5.3-long | long context · 1M | $0.75 | $3.75 |
| qwen-3.8 | web search · 512K | $0.30 | $1.50 |
Billed in credits from your balance. See tokenomics. Moderation is OFF on API keys (except the Business/Safe SKU). Rate limit: 120 req/min per key.
Works with your tools
Any OpenAI client: Cursor, Cline, Continue, SillyTavern, Agnai, LangChain, the openai SDKs. Point base_url at us and drop in your key.