REST API Reference

A language-agnostic interface for executing prompts at scale.

Authentication

Pass your API key in the custom x-api-key header for all REST requests.

GET /v1/ping
x-api-key: pf_live_9283...

Main Execution Endpoint

POST/api/v1/execute

Required Body

  • version_idUUIDRequired

    ID found in Studio History.

  • variablesMap

    Dynamic template values.

Optional Meta

  • ab_version_idUUID

    For A/B experiment routing.

Response Format

json
{
  "success": true,
  "data": "The LLM output text goes here...",
  "meta": {
    "model": "gemini-2.0-flash",
    "cached": false,
    "latency_ms": 1240,
    "tokens_input": 45,
    "tokens_output": 112
  }
}