Run with API

Trigger your Fetch Hive Prompts via endpoints.

Invoke a prompt

post

Trigger a prompt to run

Authorizations
Body
endpointstringRequiredExample: Summarize scraped website
variantstringRequiredExample: production
streamingbooleanOptionalDefault: true
Responses
200
Successful response
application/json
post
POST /v1/invoke HTTP/1.1
Host: api.fetchhive.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 134

{
  "endpoint": "Summarize scraped website",
  "variant": "production",
  "inputs": {
    "first_input": "text",
    "second_input": "text"
  },
  "streaming": true
}
{
  "model": "text",
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1
  },
  "duration": 1,
  "output": "text",
  "version_token": "text",
  "endpoint_token": "text"
}

Last updated

Was this helpful?