Skip to main content
POST
Create a prompt
See prompt workflows for integration guidance. This call returns an admission receipt. Poll the get endpoint until work stops, then inspect the result and download its 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

Submit text-only work or one document target. comment/edit access and export require a document. Native web search is enabled. The resolved provider credential is pinned at submission; replacing or deleting it can fail the next model call without managed fallback. See the guides for pricing, continuation, and retention.

prompt
string
required

Nonempty instruction, at most 1 MiB of UTF-8 bytes. The entire JSON body is limited to 2 MiB.

Required string length: 1 - 1048576
document_access
enum<string>
default:read
Available options:
read,
comment,
edit
previous_prompt_id
string

Latest successful head of the same conversation, with retained content and no active successor. Cannot be combined with inputs. Inherits provider/model and omitted response options; document_access still defaults to read. Encrypted-output requests cannot be continued.

inputs
object[]

At most one target, with exactly one file_id or artifact_id. Uploaded targets support DOCX, Markdown, HTML, and text. Direct artifact inputs require input_eligible=true and an unencrypted new request.

Maximum array length: 1
export_document
boolean
default:false

Export clean and tracked-changes DOCX artifacts for read/comment requests. edit always exports. Requires a target.

limits
object

Optional execution and spending thresholds. Spending limits are opt-in: omitted cost limits are unlimited. The time limit defaults to 900 seconds. Prompt platform cost is base fee plus tool CPU; conversion platform cost is its flat/page fee. Prompt cost limits may each be at most $500,000; conversion cost limits may each be at most $1,000,000. These thresholds do not reserve account credit.

Example:
inference
object
metadata
object

Up to 16 string values for application attribution. Keys are 1–64 UTF-8 bytes; values at most 512 UTF-8 bytes. Metadata is deleted with request content; persist your own job mapping for long-term attribution.

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

Admission receipt, including on idempotent replay. May already be running or terminal. Save the ID and poll for the result.

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

Up to 16 string values for application attribution. Keys are 1–64 UTF-8 bytes; values at most 512 UTF-8 bytes. Metadata is deleted with request content; persist your own job mapping for long-term attribution.

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.

content_expires_at
string<date-time> | null
required

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

content_deleted_at
string<date-time> | null
required
incomplete
boolean
required

True when the request returned a partial result.

comments
object[]

Flat native comment records; replies use parentId. Omitted when disabled by response_options or when content is unavailable.

changes
object[]

Pending native tracked changes. Replacements can appear as linked insertion/deletion entries. Omitted when disabled by response_options or when content is unavailable.

retention
object
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