{
"sessionID": "11111111-1111-1111-1111-111111111111",
"transcript": "hey can you help me rewrite this note",
"workflow": "rewrite",
"dictionaryWords": [],
"recognitionPreferences": {
"languageVariants": {
"english": "en-US",
"chinese": "zh-CN",
"spanish": "es-MX",
"french": "fr-FR",
"portuguese": "pt-PT"
}
},
"detectedSourceLanguage": "english",
"expressionContext": {
"personalStyle": {
"preference": "off",
"customInstruction": "",
"styleSamples": ""
},
"fallbackTone": "natural",
"appContext": {
"applicationName": "TextEdit",
"bundleIdentifier": "com.apple.TextEdit"
},
"explicitCommand": {
"kind": "polish",
"customInstruction": ""
}
}
}curl --location '/v1/refine' \
--header 'Content-Type: application/json' \
--data '{
"sessionID": "11111111-1111-1111-1111-111111111111",
"transcript": "hey can you help me rewrite this note",
"workflow": "rewrite",
"dictionaryWords": [],
"recognitionPreferences": {
"languageVariants": {
"english": "en-US",
"chinese": "zh-CN",
"spanish": "es-MX",
"french": "fr-FR",
"portuguese": "pt-PT"
}
},
"detectedSourceLanguage": "english",
"expressionContext": {
"personalStyle": {
"preference": "off",
"customInstruction": "",
"styleSamples": ""
},
"fallbackTone": "natural",
"appContext": {
"applicationName": "TextEdit",
"bundleIdentifier": "com.apple.TextEdit"
},
"explicitCommand": {
"kind": "polish",
"customInstruction": ""
}
}
}'{
"ok": true,
"data": {
"id": "ai_1111111111111111",
"taskKind": "rewrite",
"payload": {
"taskKind": "rewrite",
"sessionID": "11111111-1111-1111-1111-111111111111",
"text": "Could you help me rewrite this note?",
"completedAt": "2026-04-01T16:20:00Z",
"appliedExpression": {
"personalStyleUsed": false,
"appToneUsed": false,
"writingTone": "natural"
}
},
"render": {
"preferred": "plain_text",
"plainText": "Could you help me rewrite this note?",
"blocks": [
{
"type": "paragraph",
"text": "Could you help me rewrite this note?"
}
]
},
"meta": {
"provider": "mock",
"model": "deterministic",
"providerAttemptChain": [
{
"provider": "mock",
"model": "deterministic",
"levelAttempted": [
"json_schema"
],
"success": true,
"latencyMs": 42
}
],
"structuredOutput": {
"level": "json_schema",
"nativeSchemaUsed": true,
"nativeJsonObjectUsed": false,
"validationPassed": true,
"normalizationUsed": false,
"fallbackUsed": false
},
"tokenUsage": {
"inputTokens": 120,
"outputTokens": 24,
"totalTokens": 144
},
"latencyMs": 42
},
"createdAt": "2026-04-01T16:20:00Z"
}
}