POSTliveIntelligence

World Signals Async Job

Create an asynchronous Beyond The Veil world signal forecast job for deep production use, then poll the job URL until the quality-gated forecast is complete.

POST /v1/world/signals/jobsQuickstartOpenAPI JSON
Credits

reserves 5 credits; charges only on complete forecast

Minimum Plan

Pro+

Billing Lane

World Signals

SDK Helper

createWorldSignalsJob / create_world_signals_job

Inputs
  • +topic
  • +window days
  • +depth
  • +idempotency key
  • +scoped API key
Outputs
  • +job id
  • +status URL
  • +reserved credits
  • +job status
  • +completed forecast envelope
Tool Functions

Capabilities behind this endpoint

5 functions
mundane.forecast.job.create

Creates an async forecast job without blocking the customer request.

credits.reserve

Counts queued and running jobs against available monthly credits.

job.status.poll

Returns queued, running, failed, or complete job state without extra billing.

mundane.forecast.generate

Runs the existing quality-gated world signal engine in the worker.

usage.bill.on_success

Writes usage only after the worker produces a valid forecast.

Create Job request
{
  "topic": "markets",
  "window_days": 14,
  "depth": "deep"
}
Create Job response
{
  "request_id": "req_...",
  "data": {
    "job_id": "j57...",
    "status": "queued",
    "status_url": "https://api.theleokingai.com/v1/world/signals/jobs/j57...",
    "reserved_credits": 5,
    "poll_after_ms": 2000
  },
  "usage": { "lane": "ai", "credits": 0, "billableUnits": 0 },
  "meta": {
    "billing": "reserved_not_charged_until_complete",
    "worker": "scheduled"
  }
}
curl
curl https://theleokingai.com/api/v1/world/signals/jobs \
  -X POST \
  -H "Accept: application/json" \
  -H "x-api-key: $LEOKING_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: world-signals-job-subject-123-v1" \
  -d '{
  "topic": "markets",
  "window_days": 14,
  "depth": "deep"
}'
Node SDK
import { TheLeoKingApi } from "@theleoking/ai-api";

const api = new TheLeoKingApi({
  apiKey: process.env.LEOKING_API_KEY,
  baseUrl: "https://theleokingai.com/api"
});

const result = await api.createWorldSignalsJob(
  {
  "topic": "markets",
  "window_days": 14,
  "depth": "deep"
},
  "world-signals-job-subject-123-v1"
);

console.log(result.request_id);
console.log(result.usage.credits);
Python SDK
import os
from theleoking_ai_api import TheLeoKingApi

api = TheLeoKingApi(
    api_key=os.environ["LEOKING_API_KEY"],
    base_url="https://theleokingai.com/api",
)

result = api.create_world_signals_job(
    {
        "topic": "markets",
        "window_days": 14,
        "depth": "deep",
    },
    idempotency_key="world-signals-job-subject-123-v1",
)

print(result["request_id"])
print(result["usage"]["credits"])
Error Behavior
HTTPCodePartner Action
400INVALID_REQUESTFix the payload shape, enum value, required field, or request body before retrying.
401AUTH_REQUIREDSend x-api-key from a trusted server environment. Do not expose keys in browser code.
401AUTH_INVALIDCheck the key prefix, rotate compromised keys, and verify the target environment.
402CREDITS_EXHAUSTEDUpgrade the plan, add credits, or switch to a lower-cost Core Compute route.
403AUTH_FORBIDDENUse a key scoped for this endpoint or upgrade to the required plan.
404NOT_FOUNDVerify the job id, environment, API key, and whether the job belongs to the same workspace.
409IDEMPOTENCY_CONFLICTReuse idempotency keys only for the same logical operation and identical request payload.
429RATE_LIMITEDBack off, retry later, reduce concurrency, or request enterprise limits.
Related Endpoints