Invoke Prompt

Run a prompt deployment with the public Fetch Hive API using a deployment name and variant

POST /v1/invoke

Run a prompt deployment from your own app or service.

Authentication

Send your workspace API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Request body

Open Prompts, then Deployments, open the deployment variant you want to run, and click Code Snippet to see this request shape in Fetch Hive.

Field
Type
Required
Description

deployment

string

Yes

The prompt deployment name

variant

string

Yes

The deployment variant name

inputs

object

No

Key-value pairs for the prompt variables

streaming

boolean

No

Stream response events instead of waiting for one final JSON response

Response

If streaming is true, Fetch Hive returns a stream of events.

Example reasoning event:

{
  "request_id": "req_019d52846ea37682b03522fd0695cc43",
  "type": "reasoning",
  "model": "gpt-5-nano",
  "response": " seems"
}

Example response event:

Example final usage event:

If streaming is false, Fetch Hive returns one JSON response.

Example

Last updated