Skip to main content
POST
Queue a prompt with its maximum authorized cost
This call returns an admission receipt. Poll the get endpoint until work stops, then download the artifacts. See job lifecycle.

TypeScript

Authorizations

Authorization
string
header
required

Revise API key from https://revise.io/console/api-keys. Send Authorization: Bearer .

Headers

Idempotency-Key
string
required
Required string length: 1 - 200

Body

application/json

Prompt the shared Revise agent. Native web search is enabled by default. Provider-reported token usage and search fees are included in inference charges, with the configured premium and soft customer spending thresholds. When the account holds a provider key for the resolved provider the request runs on that key: the key is pinned at admission, deleting or replacing it fails the request at its next model call with credential_unavailable (no managed fallback), and provider error text is withheld from results.

prompt
string
required
Required string length: 1 - 1048576
document_access
enum<string>
default:read
Available options:
read,
comment,
edit
previous_prompt_id
string
inputs
object[]
Maximum array length: 1
export_document
boolean
limits
object

The base fee is graduated per API account each UTC calendar month: requests 1-1000 $0.05, 1001-5000 $0.035, 5001-10000 $0.02, then $0.01. Each newly accepted request counts once across all keys, including later failures/cancellations. Retries with the same idempotency key do not count again. The rate is pinned on admission; CPU and inference rates do not change with volume.

Example:
inference
object
metadata
object
Example:
output_encryption
object

Encrypt exported artifact bytes using compact JWE, RSA-OAEP-256 and A256GCM. Only encrypted files are downloadable. Disables prompt continuation and artifact reuse; cannot be combined with previous_prompt_id or artifact_id input. Prompts require editing or export_document=true.

response_options
object

Persisted response policy. False omits the corresponding top-level JSON field from submission, polling, history and replay responses; it does not change the document or native state. Omitted options inherit from an unencrypted predecessor or reused artifact, otherwise default to true.

retention
object

Response

Queued. The request is admitted while the account balance is positive; its spending thresholds stop new model calls based on observed costs; the final charge can exceed them.

id
string
required
conversation_id
string
required
previous_prompt_id
string | null
required
status
enum<string>
required
Available options:
queued,
running,
paused,
succeeded,
failed,
cancelled
created_at
string<date-time>
required
completed_at
string<date-time> | null
required
conversation_expires_at
string<date-time> | null
required
message
object | null
required
continuation
object
required
artifacts
object[]
required
usage
object | null
required

Customer-facing settled charges and usage. Supplier costs, margins and internal reconciliation diagnostics are not exposed. Historical charges are never recalculated using current prices.

Example:
metadata
object
required
Example:
inference
object
required
limits
object
required
error
object | null
required
api_key_id
string | null
required

Non-secret ID of the key that originally submitted this prompt; null when not recorded. Idempotent retries preserve the original key.

output_encrypted
boolean
required

True disables continuation and reuse. Artifacts are encrypted for the supplied public key.

comments
object[]

Omitted when disabled by the stored response_options. Otherwise returns the existing native schema.

changes
object[]

Omitted when disabled by the stored response_options. Otherwise returns the existing native schema.

content_expires_at
string<date-time> | null

24 hours after terminal completion. Result content and new continuation become unavailable at this deadline.

content_deleted_at
string<date-time> | null
retention
object
incomplete
boolean

True when the request returned a partial result.

stop_reason
enum<string>

Limit that ended further agent work. The current result is returned; successful partial results incur the base fee even without inference, plus actual billable usage.

Available options:
spending_limit,
time_limit