Skip to main content
POST

Authorizations

Authorization
string
header
required

The workspace API key (pdk_…) from Integrations → Built-in in the pre.dev dashboard.

Headers

x-predev-project-id
string

Attribute this call to one of the workspace's projects. An id the workspace does not own is ignored.

Body

application/json
model
string
required
Example:

"deepseek/deepseek-v4.1-flash"

input
required

A string, or an array of input items (messages, function call outputs, and so on). Send the whole conversation: responses are not stored, and previous_response_id is not supported.

instructions
string
max_output_tokens
integer
Required range: x >= 1
temperature
number
tools
object[]
text
object

Output format, for example { "format": { "type": "json_schema", … } }.

reasoning
object

Reasoning controls for models that support them. Reasoning tokens count as output tokens.

stream
boolean
default:false

Response

The response object, or Responses API events when stream is true.

id
string
required

Generation id (pdg-…).

object
string
required
Allowed value: "response"
model
string
required
status
enum<string>
required
Available options:
completed,
incomplete,
in_progress,
failed,
cancelled,
queued
output
object[]
required

Output items: messages with output_text parts, reasoning, and function calls.

created_at
integer
output_text
string

The concatenated text output, when present.

usage
object