Skip to main content
POST
/
prompt
/
{slug}
/
run
Error
A valid request URL is required to generate request examples
{
  "id": "<string>",
  "object": "chat.completion",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "system",
        "content": "<string>",
        "name": "<string>",
        "tool_calls": [
          {
            "id": "<string>",
            "type": "function",
            "function": {
              "name": "<string>",
              "arguments": "<string>"
            }
          }
        ],
        "tool_call_id": "<string>"
      },
      "finish_reason": "stop",
      "logprobs": {
        "content": [
          {
            "token": "<string>",
            "logprob": 123,
            "bytes": [
              123
            ],
            "top_logprobs": [
              {
                "token": "<string>",
                "logprob": 123,
                "bytes": [
                  123
                ]
              }
            ]
          }
        ]
      }
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123,
    "prompt_tokens_details": {
      "cached_tokens": 123
    },
    "completion_tokens_details": {
      "reasoning_tokens": 123,
      "accepted_prediction_tokens": 123,
      "rejected_prediction_tokens": 123
    },
    "cache_creation_input_tokens": 123,
    "cache_read_input_tokens": 123
  },
  "system_fingerprint": "<string>"
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token.

Path Parameters

slug
string
required

Unique slug identifier for the prompt template.

Body

application/json
model
string

Model to use for the prompt run. If omitted, the model from the prompt's model_params is used.

variables
object

Key-value map of template variables. Each {{key}} in the prompt messages is replaced with the corresponding value.

Response

Chat completion result from the prompt run

id
string
object
string
Example:

"chat.completion"

created
integer<int64>
model
string
choices
object[]
usage
object
system_fingerprint
string