Generate text for a specific workflow
cURL
curl --request POST \ --url https://itz.am/api/v1/generate/text \ --header 'Api-Key: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "input": "Tell me about renewable energy", "attachments": [ { "file": "file_data", "mimeType": "application/pdf" }, { "file": "image_data", "mimeType": "image/png" }, { "file": "https://example.com/image.jpg" } ], "contextSlugs": [ "special-docs", "admin-files" ], "type": "<string>", "callback": { "url": "https://example.com/callback", "customProperties": {}, "headers": {} }, "workflowSlug": "my_great_workflow" }'
{ "text": "Renewable energy is...", "metadata": { "runId": "run_1234567890", "cost": "0.001", "model": { "name": "gpt-4o", "tag": "openai:gpt-4o" }, "durationInMs": 1000, "inputTokens": 1000, "outputTokens": 1000 } }
The API key to use for authentication
Successfully generated content (we also return the run ID in the header X-Run-ID)
The response is of type object.
object