Set the workspace's OpenAI key and image model
Set the workspace's OpenAI key and image model (admin)
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
PUT
The key is checked with OpenAI (listing the model, which costs nothing), then stored encrypted. Without api_key, only the model changes.
header
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
application/json- body
provider?"openai"Value in
"openai"model?stringDefaults to gpt-image-1
Value in
"gpt-image-1""gpt-image-1-mini""dall-e-3""dall-e-2"api_key?stringAn OpenAI API key (sk-...)
AI status
application/json- response
configured*booleanprovider*"openai"Value in
"openai"model*stringkey_hint*stringThe key's last four characters, e.g. ...a1b2
capabilities*reason*stringWhy AI is off or limited, in plain words; empty when everything works
models*array<string>can_manage*booleanThe caller may set or remove the key (admin)
updated_at?stringFormat
date-timecurl -X PUT 'https://staqly.example.com/v1/ai' \ -H 'Content-Type: application/json' \ -d '{}'{ "configured": true, "provider": "openai", "model": "string", "key_hint": "string", "capabilities": { "generate": true, "edit": true, "inpaint": true, "expand": true }, "reason": "string", "models": [ "string" ], "can_manage": true, "updated_at": "2019-08-24T14:15:22Z"}