AI generation
Available writing models and pricing
Use this endpoint from your own integration, with the same account permissions and safeguards as the app.
Request
GET
/api/v1/ai/modelsExample requestcURL
curl 'https://postlift.io/api/v1/ai/models' \
-H "Authorization: Bearer $POSTLIFT_API_KEY"Replace path placeholders with your Postlift resource IDs. Example timestamps must be replaced with a future time; preserve the same timestamp when retrying the same operation.
Parameters
No path or query parameters. Send your API key in the Authorization header.
Response
200 Successful operation.
| Field | Type & constraints |
|---|---|
modelsrequired | object[] |
defaultModelrequired | string |
pricingVersionrequired | string |
weightedTokensPerCreditrequired | integer |
maxOutputTokensrequired | integer |
maxMessagesrequired | integer |
maxContextBytesrequired | integer |
View JSON schema
{
"type": "object",
"properties": {
"models": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"defaultModel": {
"type": "string"
},
"pricingVersion": {
"type": "string"
},
"weightedTokensPerCredit": {
"type": "integer"
},
"maxOutputTokens": {
"type": "integer"
},
"maxMessages": {
"type": "integer"
},
"maxContextBytes": {
"type": "integer"
}
},
"required": [
"models",
"defaultModel",
"pricingVersion",
"weightedTokensPerCredit",
"maxOutputTokens",
"maxMessages",
"maxContextBytes"
],
"additionalProperties": true
}Errors & retries
Failures use a stable error code and request ID. Check the current resource version or request status before retrying a write.
| Status | Meaning |
|---|---|
400 | Invalid input or Jev rejection |
401 | Invalid, expired or revoked API key |
402 | Plan, publishing quota or AI credit requirement |
403 | Missing scope |
404 | Resource not found or not owned |
409 | Version conflict, missing voice or duplicate AI operation |
413 | Payload too large |
429 | Rate or concurrency limit |
500 | Internal error |
502 | Upstream failure; inspect operation status |
503 | Service or review unavailable |