POST
/
api
/
v1
/
generate
/
object
curl --request POST \
  --url https://itz.am/api/v1/generate/object \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "Tell me about renewable energy",
  "workflowSlug": "my_great_workflow",
  "groupId": "my-group-id",
  "schema": {
    "title": "My great response",
    "description": "The response to the input",
    "type": "object"
  }
}'
{
  "object": "<any>",
  "metadata": {
    "runId": "run_1234567890",
    "cost": "0.001",
    "model": {
      "name": "gpt-4o",
      "tag": "openai:gpt-4o"
    },
    "durationInMs": 1000,
    "inputTokens": 1000,
    "outputTokens": 1000
  }
}

Authorizations

Api-Key
string
header
required

The API key to use for authentication

Body

application/json

Response

200
application/json

Successfully generated object (we also return the run ID in the header X-Run-ID)

The response is of type object.