API reference

API reference · Prompts

Price or run a version from the dashboard

POST/api/account/prompts/{id}/testSigned in session

run false renders the version with the values and answers the most it could cost, sending nothing. run true sends it as a request by the account (free allowance, hold and settlement, monthly cap, freeze), under session prompts; its usage row names the version. Same origin.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringpmpt_ id.

Request body

application/json, required

Request body fields
FieldTypeWhat it is
versioninteger or stringA number or a label.
variablesobject
modelstring
maxTokensintegerDefault 1024.
runbooleanDefault false.

Example

{
  "model": "antimatter/auto"
}

Answer 200

The price, and with run the answer and what it was billed.

Fields of the 200 answer
FieldTypeWhat it is
versioninteger
modelstring
worstCaseMicrosinteger
messagesarray of object
messages[].rolerequiredstringOne of "system", "developer", "user", "assistant".
messages[].contentrequiredstringText with {{variables}}: two braces, a name, two braces. At most 64000 characters.
textstring
costMicrosinteger

Errors

  • 400OpenAI shaped error.
  • 401OpenAI shaped error.
  • 402OpenAI shaped error.
  • 404OpenAI shaped error.
  • 429OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter