---
title: "Store completed task result"
method: POST
path: "/api/dedupq/complete"
tags: ["DedupQ"]
---

# Store completed task result

`POST /api/dedupq/complete`

## Request

- Base URL: `https://plith.ai`
- URL: `https://plith.ai/api/dedupq/complete`
- Auth: none required

Stores a task result so future identical or semantically similar tasks return a cache hit. Generates a content hash and (optionally) an OpenAI embedding. Degrades gracefully if OpenAI is unavailable — stores without vector. Costs 2 credits.

## Request body

- object
  - `content` string, required: The original task content. Used to compute the hash and embedding.
  - `result` unknown, required
  - `task_id` string: Optional. Your task ID used for dedup tracking and lock correlation.
  - `hash_only` boolean: Skip embedding generation; store with hash-only caching.

## Response `200`

Task result stored

- object
  - `stored` boolean
  - `task_id` string, uuid: ID of the stored task row.
  - `content_hash` string: SHA-256 of the content.
  - `has_embedding` boolean: Whether a vector embedding was generated and stored.
  - `cross_product` object
  - `request_id` string
  - `credits_used` integer
  - `credits_remaining` integer
  - `fallback_behavior` string

## Other responses

- `400`: Missing or invalid request body
- `401`: Invalid or missing API key
- `402`: Insufficient credits
- `500`: Internal server error

---

[API](https://skmtc.dev/plith/apis/plith-api.md) · [All operations](https://skmtc.dev/plith/apis/plith-api/llms.txt) · [OpenAPI document](https://skmtc.dev/plith/apis/plith-api/revisions/4a03164b0d75?raw)
