Skip to main content
POST
/
api
/
scenequery
/
optimizePromptChat
Optimize prompt via chat
curl --request POST \
  --url https://api2.rhombussystems.com/api/scenequery/optimizePromptChat \
  --header 'Content-Type: application/json' \
  --header 'x-auth-apikey: <api-key>' \
  --header 'x-auth-scheme: <x-auth-scheme>' \
  --data '
{
  "context": {
    "deviceFacetUuid": "AAAAAAAAAAAAAAAAAAAAAA.v0",
    "expectedAnswer": "<string>",
    "optionalContext": "<string>",
    "originalAnswer": "<string>",
    "originalPrompt": "<string>",
    "region": {
      "coordinates": [
        {
          "x": 123,
          "y": 123
        }
      ]
    },
    "timestampMs": 123
  },
  "currentMessage": "<string>",
  "history": [
    {
      "role": "<string>",
      "text": "<string>"
    }
  ]
}
'
{
  "error": true,
  "errorMsg": "<string>",
  "explanation": "<string>",
  "optimizedPrompt": "<string>",
  "questionForUser": "<string>",
  "warningMsg": "<string>"
}

Authorizations

x-auth-apikey
string
header
required

Your Rhombus API key. Must be accompanied by the x-auth-scheme header set to api-token (or partner-api-token for partner endpoints).

Headers

x-auth-scheme
enum<string>
default:api-token
required

Authentication scheme identifier. Use api-token for standard API key authentication, partner-api-token for partner API key authentication. Must be paired with the x-auth-apikey header containing your API key.

Available options:
api-token,
api,
partner-api-token,
partner-api

Body

application/json

Request object for prompt optimization chat.

context
object

Context for prompt optimization including the camera frame, original prompt, and expected answer.

currentMessage
string | null

Current user message

history
object[] | null

Chat history messages

Response

200 - application/json

OK

Response object for prompt optimization chat.

error
boolean | null
errorMsg
string | null
explanation
string | null

Explanation of the optimization

optimizedPrompt
string | null

The optimized prompt

questionForUser
string | null

Follow-up question for the user, if any

warningMsg
string | null
Last modified on April 27, 2026