SubReply

Endpoints

Generate a comment

Writes a natural Reddit comment from a post and your product: the tone of the subreddit, a single product mention, no promotional tells.

POST/api/v1/generate-comment35 credits

The comment is stored nowhere on our side: it is returned once, and it is yours to keep. You can publish it yourself, have it reviewed, or send it to the publishing endpoint.

Parameters

Request body (application/json)

ParameterTypeRequiredDescription
post_urlstringRequiredFull URL of the Reddit post. Must start with https://www.reddit.com/ or https://reddit.com/. It doubles as the idempotency key for the charge.
post_titlestringRequiredTitle of the post. It carries most of the context. 300 characters at most.
post_bodystringOptionalBody of the post, when there is one. 2,000 characters at most. Providing it yields a markedly more specific comment.
product_descriptionstringRequiredDescription of your product or service. Between 10 and 500 characters. Without it, there is nothing to mention.
product_namestringOptionalProduct name, 60 characters at most. When absent it is inferred from the start of the description — often less cleanly.
target_languagefr | enOptionalFallback language for the comment. The detected language of the post still takes priority.Default: "fr"

Example

cURL
curl -s -X POST https://subreply.io/api/v1/generate-comment \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sr_live_VOTRE_CLE_API" \
  -d '{
    "post_url": "https://www.reddit.com/r/startupfrance/comments/1abc23/...",
    "post_title": "Comment trouver mes premiers clients B2B sans réseau ?",
    "post_body": "Je lance mon cabinet de conseil et je n'\''ai aucun réseau...",
    "product_description": "SaaS de gestion de leads pour TPE/PME françaises",
    "product_name": "Leadly",
    "target_language": "fr"
  }'

credits_used is the REAL charge, not the price list: it is 0 on an idempotent replay. credits_remaining is your balance after the call — enough to stop a workflow before it runs out of credits.

Idempotency

The charge is keyed on the post URL, normalised (trailing slash, domain casing and tracking parameters ignored). Two calls on the same post therefore bill once: the second returns a fresh comment with credits_used: 0.

The practical consequence: replaying a call after a network timeout costs nothing. You can retry without counting your calls.

The generation is owed to you, even if the charge fails

If the charge errors out after a successful generation, you still receive the comment, with credits_used: 0. The loss is ours: we never bill for work we did not deliver, and we never hold back work already produced.

Best practices

  • Always pass product_name — the product mention is then exact and natural, instead of being guessed from the description.
  • Chain it after /scrape : scrape first (free), then generate only on posts above score: 0.7. That is the best ratio of credits spent to replies earned.
  • Send post_body whenever it exists : a comment that answers the detail of the post blends in, a comment that answers the title alone stands out.
  • Read it before publishing if the topic is sensitive. The text is ready to paste, it is still written by an AI.

The language of the post wins

target_language is a FALLBACK, not an order: generation follows the detected language of the post first. We never answer in French under an English thread — an off-language comment is the fastest way to get spotted and removed.