BETA
Documentation
Create completion
POST/v1/completions
The legacy plain-text completion protocol (a prompt string in, generated text out) — for clients that haven't migrated to the chat format yet. Forwarded the same generic way as every other route.
Request body
model
required, string — a catalog id from GET /v1/models
prompt
required, string (or array of strings)
max_tokens
optional, number — capped server-side to what your balance can cover
cURL example
terminal
curl https://apily.pro/v1/completions \
-H "Authorization: Bearer apily_your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-sol","prompt":"Once upon a time","max_tokens":50}'