DedupQ

Store completed task result

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.

post/api/dedupq/complete

Request

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

Request body

contentstring required

The original task content. Used to compute the hash and embedding.

resultunknown required
task_idstring

Optional. Your task ID used for dedup tracking and lock correlation.

hash_onlyboolean

Skip embedding generation; store with hash-only caching.

Response

Task result stored

storedboolean
task_idstring uuid

ID of the stored task row.

content_hashstring

SHA-256 of the content.

has_embeddingboolean

Whether a vector embedding was generated and stored.

cross_productobject
request_idstring
credits_usedinteger
credits_remaininginteger
fallback_behaviorstring

Example response

{
  "stored": true,
  "request_id": "req_a1b2c3d4e5f6",
  "credits_used": 2,
  "credits_remaining": 4998,
  "fallback_behavior": "proceed_without_dedup"
}

Changes

No recorded changes to this operation across all 1 revision of this API.