POST
/v1/completionsCreate a text completion (legacy prompt format)
Credit meteringCaching
Authentication
Send your virtual key as Authorization: Bearer sk-nemo-…. One key works across every model and modality.
Request bodyapplication/json
| Field | Type | Required |
|---|---|---|
| model | string | required |
| prompt | string | required |
| max_tokens | integer | optional |
| temperature | number | optional |
Response200
{
"id": "cmpl-abc123",
"object": "text_completion",
"model": "gpt-4o-mini",
"choices": [
{
"text": " there!",
"index": 0,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 2,
"completion_tokens": 2,
"total_tokens": 4
}
}Errors
| Status | Meaning |
|---|---|
| 400 | 400 — Guardrail blocked the request |
| 402 | 402 — Not enough credits |
| 429 | 429 — one of: rate_limit_exceeded (RPM limit exceeded); tpm_limit_exceeded (TPM limit exceeded) |
| 503 | 503 — Credit system unavailable |