Skip to main content
Post generation jobs turn an anecdote into a draft post through YALG’s AI workflow.

Create a job

curl https://api.yalg.ai/v1/post-generation/from-anecdote \
  -H "x-api-key: $YALG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "anecdoteId": "123e4567-e89b-12d3-a456-426614174000",
    "platform": "linkedin"
  }'
The response includes the job ID and current status.

Run the pipeline

Some integrations create a job and then explicitly run it:
POST /v1/post-generation/{id}/run

Check job status

GET /v1/post-generation/{id}
Poll at a reasonable interval and stop when the job reaches a terminal state.

Validate generated content

POST /v1/post-generation/{id}/validate
Validation creates the resulting post when the job is ready.

Regenerate or reject

Use these endpoints for review workflows:
  • POST /v1/post-generation/{id}/regenerate
  • POST /v1/post-generation/{id}/reject
Both require a reason in the request body.