Skip to content
Get your keyGet a key

Reference · Creative Director

POST/director/messages

Send the Creative Director a message, and stream or fetch its reply

Sends a message to the Creative Director, the agent that plans and writes ads, scripts and shot lists and proposes what to make. Spending tools only ever quote inside a reply: what it proposes comes back as a batch, made only with POST /director/batches/{batchId}/approve. With stream: true the reply comes as server-sent events — start, text (its words as they are written), status (what it is doing), batch (a proposal), done (with the credits it used) or error; otherwise the answer is at once, and the reply is read from the thread.

Key needs
create · Make things and spend credits
Answers
Data
Request
curl -X POST https://vessero.com/api/v1/director/messages \
  -H "Authorization: Bearer $VESSERO_API_KEY" \
  -H "Idempotency-Key: 47f8f6f5-ea00-4fb1-925f-76aac956a0ec" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "Plan three 15 second UGC ads for our linen shirts: hooks, scripts and shots.",
    "confirmCredits": 113,
    "stream": true
  }'
Response202 Accepted
{
  "object": "director.message",
  "id": "5e4d3c2b-1a0f-4e9d-8c7b-6a5f4e3d2c1b",
  "threadId": "1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
  "status": "working",
  "expectedCredits": 113,
  "thread": "/api/v1/director/threads/1d2c3b4a-5e6f-4a7b-8c9d-0e1f2a3b4c5d"
}
POST/director/messages/quoteFree

The same body without confirmCredits. It answers the price and your balance, and runs nothing.

Header

  • Idempotency-KeystringYour id for this request: 8–64 letters, digits, - or _. A repeat within 10 minutes gets the first answer back and never runs twice. Use the same one for the quote and the run.

Body

  • messagestringrequiredWhat you ask the Creative Director, as a person would type it.
  • threadIdstringThe conversation to carry on; left out, a new one.
  • attachmentsstring[] · up to 8Storage keys from POST /files: product pictures, a clip, a recording.
  • productIdstringA product from GET /products, for the director to work from.
  • boardIdstringA board to work on: its free edits reach it.
  • fromstringThe studio the message is about (ugc, video, images, …).
  • confirmCreditsintegerrequiredThe first step’s price, from its quote.
  • streambooleantrue for the reply as server-sent events.

Answers

  • 202startedSent: the reply is written on, into its thread.
  • 200streamWith stream: true, the reply as server-sent events.
  • 400confirm_credits_requiredA run that spends needs confirmCredits: the quote is in details.
  • 402insufficient_creditsThe account has too few credits for this.
  • 409price_changedThe price is above the confirmCredits sent: nothing ran; the new quote is in details.
  • 503unavailableNot available right now: try again in a while.
Next in Creative DirectorPOST/director/messages/quote