VORQ Docs
Reference

Results

Reference for TextResult, MediaResult and EmbeddingResult, the values a settled job returns.

handle.result() and the batch methods return one of three dataclasses, chosen by the shape of the opened result: an embeddings response becomes an EmbeddingResult, a result with images or video a MediaResult, and anything else a TextResult.

Common attributes

AttributeTypeMeaning
.ratestuple[Decimal | None, Decimal | None]The order's signed (rate_in, rate_out), in USD per 1M units.
.coststrUSD decimal string: ((prompt_tok − cached_tok) × rate_in + cached_tok × rate_in_cached + completion_tok × rate_out) / 1,000,000, rounded up to the atomic unit (0.000001 USD, minimum one) exactly as the chain charges it. Excludes the protocol and gas fees. See Units and cost.
.prompt_tokintPrompt units the job settled on, cached ones included: the model's own count, at most units_in. For media, the declared reference units. From the job row.
.cached_tokintThe part of .prompt_tok the model served from its cache. From the job row.
.completion_tokintOutput units the job settled on, at most units_out. From the job row.
.rate_in_cachedDecimal | NoneUSD per 1M cached prompt units, as settled. None when the row carries none.
.gas_feeDecimalThe flat gas fee the job was posted under, in USD, paid on top of .cost.
.feeDecimalThe protocol fee settlement took, in USD, paid on top of .cost.
.providerint | str | NoneRegistry id of the provider that settled the job.
.job_idstr | NoneThe job that produced the result.
.custom_idstr | NoneYour custom_id, read back from the sealed result. None when you set none.
.rawdictThe opened result object.

TextResult

AttributeTypeMeaning
.textstrThe generated text, joined from the output items.
.outputlistThe raw output items: Responses output items, or choices for a chat-completion result.
.usagedictinput_tokens, output_tokens and total_tokens, as the model reported them. .cost reads the settled counts, not this.

MediaResult

The frames travel inside the sealed result as base64, so these methods make no network call.

MemberTypeMeaning
.frameslist[dict]The delivered frames in order: one per image, or one entry for a video. Each has b64, content_type, width and height, plus duration_secs for video.
.seedint | NoneThe seed the model used, when reported.
.bytes()list[bytes]The frames decoded, in order. A frame with missing or invalid base64 raises ResultIntegrityError.
.download(dir)list[Path]Creates dir if needed and writes each frame as 0, 1, … with a suffix from its content_type (.png, .jpg, .webp, .mp4, .webm, otherwise .bin). Returns the paths.

EmbeddingResult

MemberTypeMeaning
.embeddingslist[dict]The response's data array, unchanged.
.modelstr | NoneThe model named in the response.
.prompt_tokensintInput tokens, as the response reported them.
.bytes()list[bytes]The vectors decoded from base64. Raises VorqError when the response used encoding_format="float"; read .embeddings instead.

JobError

A batch line that never delivered. See Batches.

On this page