Skip to content

Get a signed URL for a single-prompt chat

POST
/ai/text/chat/signed
curl --request POST \
--url https://ai.work.optidata.cloud/api/ai/text/chat/signed \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "prompt": "Reply with the single word OK." }'

Stores the prompt for one hour and returns a signed URL that streams the answer when opened with GET, without an authentication key — for browser EventSource clients. See GET /ai/text/chat.

Media typeapplication/json
object
prompt
required

The message to send.

string
Examples
Exampleprompt
{
"prompt": "Reply with the single word OK."
}

A signed URL that streams the answer when opened with GET.

Media typeapplication/json
object
url
required

Open with GET, unchanged, within one hour.

string format: uri
Examples
Examplesigned
{
"url": "https://ai.work.optidata.cloud/api/ai/text/chat?owt1=1&request_guid=a305082f-f339-4825-9a40-144077d1f9fa&signature=3f9a0c1e7b5d4a2f8e6c9b1d0a7f3e5c2b8d4a6f1e9c7b3d5a0f2e8c6b4d1a9f"
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}