API reference
Completions
Legacy text completions.
On this page
POST/v1/completions
Continues a prompt on a model that serves the completions endpoint.
Auth: API key, or pay per request under https://api.usdf.fi/x402
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A model id that lists completions among its endpoints. |
prompt | string | Yes | The text to continue. |
max_tokens | integer | No | The most tokens the reply may use. |
POST /v1/completions
curl
curl -X POST https://api.usdf.fi/v1/completions \
-H "Authorization: Bearer $USDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "<model>",
"prompt": "The capital of France is",
"max_tokens": 16
}'Foundry documentation