Map Inline Formatting Aca Endpoint
const url = 'https://example.com/format/map_inline_formatting_aca';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"source_text":"example","target_translation":"example","source_lang":"example","target_lang":"example","spans":[{"id":"example","text":"example","type":"example"}],"system_prompt":"example","model":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/format/map_inline_formatting_aca \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "source_text": "example", "target_translation": "example", "source_lang": "example", "target_lang": "example", "spans": [ { "id": "example", "text": "example", "type": "example" } ], "system_prompt": "example", "model": "example" }'Map inline formatting spans using an managed model with a custom system prompt and model override.
Same task as /format/map_inline_formatting but accepts:
- system_prompt: custom system prompt (defaults to the standard formatting mapping prompt)
- model: registered ACA model name (defaults to “managed-model”)
Note: ACA models scale to zero — first request after idle may take 60-180s while the model warms up.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Full source text
Full translated text
Source language code (e.g. ‘en’)
Target language code (e.g. ‘de’)
Formatting spans to map from source to target
object
UUID of the source formatting span
The formatted text in the source
Formatting type: bold, italic, underline, etc.
Examplegenerated
{ "source_text": "example", "target_translation": "example", "source_lang": "example", "target_lang": "example", "spans": [ { "id": "example", "text": "example", "type": "example" } ], "system_prompt": "example", "model": "example"}Responses
Section titled “Responses”Successful Response
object
Successfully mapped formatting spans
object
UUID of the source span this mapping refers to
Exact substring of the target translation to format
Model confidence for this mapping
Spans dropped due to failed self-check or low confidence
Processing time in milliseconds
Whether the mapping call succeeded
Examplegenerated
{ "mappings": [ { "source_id": "example", "target_text": "example", "confidence": 1 } ], "dropped_count": 1, "processing_time_ms": 1, "success": true, "error_message": "example", "usage": { "prompt_tokens": 1, "completion_tokens": 1, "total_tokens": 1, "quantization": "example", "gpu_mem_allocated_gb": 1, "gpu_mem_reserved_gb": 1 }}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}