v1

latestSwagger 2.02026-07-176096209.1 KB
v2

Initiate an Asynchronous request to generate text

This endpoint will immediately return with the UUID of the request for generation. This endpoint will always be accepted, even if there are no workers available currently to fulfill this request. Perhaps some will appear in the next 20 minutes. Asynchronous requests live for 20 minutes before being considered stale and being deleted.

post/v2/generate/text/async

Headers

apikeystring required

The API Key corresponding to a registered user.

Client-Agentstring

The client name and version

X-Fieldsstring mask

An optional fields mask

Request body

promptstring

The prompt which will be sent to KoboldAI to generate text.

softpromptstring

Specify which softpompt needs to be used to service this request.

trusted_workersboolean

When true, only trusted workers will serve this request. When False, Evaluating workers will also be used which can increase speed but adds more risk!

slow_workersboolean

When True, allows slower workers to pick up this request. Disabling this incurs an extra kudos cost.

workersstring[]
worker_blacklistboolean

If true, the worker list will be treated as a blacklist instead of a whitelist.

modelsstring[]
dry_runboolean

When true, the endpoint will simply return the cost of the request in kudos and exit.

proxied_accountstring

If using a service account as a proxy, provide this value to identify the actual account from which this request is coming from.

disable_batchingboolean

When true, This request will not use batching. This will allow you to retrieve accurate seeds. Feature is restricted to Trusted users and Patreons.

allow_downgradeboolean

When true and the request requires upfront kudos and the account does not have enough The request will be downgraded in max context and max tokens so that it does not need upfront kudos.

webhookstring

Provide a URL where the AI Horde will send a POST call after each delivered generation. The request will include the details of the job as well as the request ID.

Example request

{
  "params": {
    "n": 1,
    "use_default_badwordsids": true
  }
}

Response

Generation Queued

idstring

The UUID of the request. Use this to retrieve the request status in the future.

kudosnumber

The expected kudos consumption for this request.

messagestring

Any extra information from the horde about this request.

Example response

{
  "warnings": [
    {
      "code": "NoAvailableWorker"
    }
  ]
}