POST
/
api
/
parea
/
v1
/
completion
p = Parea(api_key="PAREA_API_KEY")  # replace with your API key

response = p.completion(
    Completion(
        deployment_id="p-qZrnFesaeCpqcXJ_yL3wi",
        llm_inputs={"x": "Golang", "y": "Fiber"},
        metadata={"purpose": "testing"},
    )
)
{
  "cache_hit": true,
  "content": "Sure! Here's a simple Hello World program...",
  "cost": 0.0008,
  "end_timestamp": "2024-07-24 18:05:17",
  "input_tokens": 22,
  "latency": 0,
  "model": "gpt-4o-mini-2024-07-18",
  "output_tokens": 189,
  "start_timestamp": "2024-07-24 18:05:17",
  "status": "success",
  "total_tokens": 211,
  "trace_id": "ush221-d23rfcasc-21cdsc"
}
p = Parea(api_key="PAREA_API_KEY")  # replace with your API key

response = p.completion(
    Completion(
        deployment_id="p-qZrnFesaeCpqcXJ_yL3wi",
        llm_inputs={"x": "Golang", "y": "Fiber"},
        metadata={"purpose": "testing"},
    )
)

Authorizations

x-user-id
string
header
required

Body

application/json

Response

200
application/json
Successful Response

The response is of type object.