Retry an analysis inference run
const url = 'https://api.neuramancer.dev/v1/analysis/retry';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"id":"example","tenantName":"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://api.neuramancer.dev/v1/analysis/retry \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "id": "example", "tenantName": "example" }'Updates analysis options and schedules a new inference run. Requires authentication.
Tier upgrade (flagging => forensicReporting): When options.tier changes from flagging to forensicReporting, this is treated as a tier upgrade - no re-inference occurs. The tier flag is updated in the database, tierUpgradedFrom and tierUpgradedAt are set, and the forensicReporting billing counter is incremented. The full forensic result data (predictions, uncertainties, heatmaps, etc.) becomes immediately available.
Tier downgrade (forensicReporting => flagging) is not permitted and returns 400.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Analysis options to merge for the retry run. When options.tier upgrades from ‘flagging’ to ‘forensicReporting’, this is a billing-relevant tier upgrade (no re-inference). Downgrade from ‘forensicReporting’ to ‘flagging’ is not permitted.
object
Analysis id (ObjectId string)
Tenant name to scope the request
Examplegenerated
{ "id": "example", "tenantName": "example"}Responses
Section titled “Responses”Retry scheduled and updated analysis returned
object
object
Database ObjectId (string)
Blob storage type
object
S3 storage URLs for input file
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
object
Inference model identifier
The decisionStrategy parameter controls decision strategy the “uncertain” / “abstain” ratio. It doesn’t change the classification of real vs. fake.
Analysis tier. Defaults to ‘flagging’ which returns only the simple flag (resultClass, resultSubClasses, decisionStrategy). Use ‘forensicReporting’ to receive detailed predictions, uncertainties, similarities, text content, heatmaps, and localized report access.
Seed for random number generation in inference. A fixed seed (default 1337) produces stable, reproducible results due to seeded random behaviour. Varying the seed introduces non-determinism for more probabilistic results.
Image width in pixels (must be >64 and ≤4096)
Image height in pixels (must be >64 and ≤4096)
object
Inference result for an image analysis. For ‘flagging’ tier analyses, only resultClass and resultSubClasses are populated; all other fields are null. All fields are populated for ‘forensicReporting’ tier.
object
Final classification: 0 real | 1 fake | 2 abstain | 3 uncertain
Sub-classification: 0 ai-generated | 1 ai-manipulated | 2 manipulated (empty set is allowed)
Per-class prediction probabilities.
object
Probability the image is authentic (0.0 - 1.0)
Probability the image is synthetic/manipulated (0.0 - 1.0)
Compression artifact score (0.0 - 1.0)
Per-class uncertainty estimates (Monte-Carlo derived).
object
Uncertainty measure for the real classification
Uncertainty measure for the fake classification
Uncertainty measure for compression detection
Per-class similarity scores.
object
Similarity score between real and compressed features
Similarity score between fake and compressed features
Anomaly detection results (score, numCluster, giniCoeff). Null on error or for ‘flagging’ tier analyses.
object
Overall anomaly score in the range 0.0 - 1.0.
Number of detected anomaly clusters (integer).
Gini coefficient of the spatial anomaly distribution (0.0 - 1.0).
Heatmap visualizations. Null if no heatmaps were generated, on error, or for ‘flagging’ tier analyses.
object
Storage URLs for the real/authenticity heatmap
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
Storage URLs for the fake/synthetic heatmap
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
Storage URLs for the compression heatmap
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
Storage URLs for the anomaly heatmap
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
Localized report outputs keyed by language. Only available for ‘forensicReporting’ tier; null otherwise, if not yet generated, or on error.
object
Localized report output for a single supported language.
object
Storage URLs for the localized PDF report.
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
Short localized summary of the forensic verdict.
Localized detailed forensic explanation.
Localized introductory text for the heatmaps section.
Localized explanatory text per heatmap type (real, fake, compressed, anomaly).
object
Localized concluding verdict.
Localized report output for a single supported language.
object
Storage URLs for the localized PDF report.
object
Storage backend type
S3 object key used to regenerate presigned URLs on expiry
Presigned URL for uploading
Presigned URL for downloading
Presigned URL for deletion
ISO date string when the URLs expire
Short localized summary of the forensic verdict.
Localized detailed forensic explanation.
Localized introductory text for the heatmaps section.
Localized explanatory text per heatmap type (real, fake, compressed, anomaly).
object
Localized concluding verdict.
Immutable creator identifier. Stores the MongoDB user ObjectId string for user-authenticated requests, the API key UUID for API-key requests, or null for system-created records.
Actor type that last changed the analysis (for example user or api).
Identifier of the actor that last changed the analysis. Stores the MongoDB user ObjectId string for user-authenticated requests, the API key UUID for API-key requests, or null for system updates.
Projected display name of the user referenced by lastChangedByUserId. Populated on analysis read responses when the last actor type is user and the corresponding user record has a name; otherwise null.
Original tier before a tier upgrade via POST /v1/analysis/retry (e.g. flagging). Null if no upgrade has occurred. Downgrades are not permitted.
Timestamp of when the tier upgrade occurred. Null if no upgrade has occurred.
Example
{ "success": true, "data": [ { "storageType": "azure", "type": "image", "input": { "format": "jpg", "storageUrls": { "type": "azure" }, "options": { "model": "nais-image-latest", "decisionStrategy": "default", "tier": "forensicReporting", "seed": 1337 }, "version": "v1" }, "inferenceStatus": { "status": "pending", "result": { "heatmaps": { "realHeatmapStorageUrls": { "type": "azure" }, "fakeHeatmapStorageUrls": { "type": "azure" }, "compressionHeatmapStorageUrls": { "type": "azure" }, "anomalyHeatmapStorageUrls": { "type": "azure" } }, "report": { "de": { "pdfStorageUrls": { "type": "azure" } }, "en": { "pdfStorageUrls": { "type": "azure" } } } } }, "tierUpgradedFrom": "flagging" } ]}Missing id or options, invalid request, or tier downgrade attempted (forensicReporting => flagging is not permitted)
Standardized error response following the APIResponse
object
Example
{ "success": false, "message": "Bad request"}Unauthorized - userType not found in token
Standardized error response following the APIResponse
object
Example
{ "success": false, "message": "Bad request"}Tenant or analysis not found
Standardized error response following the APIResponse
object
Example
{ "success": false, "message": "Bad request"}