Agent API (x402)Sync routes

Sync routes

One HTTP round-trip after payment. Paths mirror Venice under /api/v1/*.

PathNotes
POST /api/v1/chat/completionsmodel, messages; optional stream. Reasoning models: see below
POST /api/v1/responsesResponses API (alpha) — typed blocks may include reasoning
POST /api/v1/embeddingsmodel, input
POST /api/v1/image/generateVenice native image gen — JSON { id, images[], request, timing } (base64, often webp). Not raw PNG.
POST /api/v1/images/generationsOpenAI-compatible JSON (created, data[])
POST /api/v1/image/editSingle-image edit — often returns raw image/png
POST /api/v1/image/multi-editMulti-image edit (modelId); often raw PNG
POST /api/v1/image/upscaleUpscale — often raw PNG
POST /api/v1/image/background-removeNo model in body; often raw PNG
POST /api/v1/audio/speechShort TTS — often raw audio/*
POST /api/v1/audio/transcriptionsASR — multipart (model + file)
POST /api/v1/audio/voicesVoice clone — multipart: exact catalog model + sample file
POST /api/v1/video/transcriptionsYouTube { url } (optional duration_seconds for pricing only)
POST /api/v1/augment/searchWeb search
POST /api/v1/augment/scrapeScrape URL
POST /api/v1/augment/text-parserParse PDF/DOCX/etc.
POST /api/v1/crypto/rpc/{network}JSON-RPC; pick network from free networks list

Request bodies follow Venice / OpenAPI schemas. model must be an exact id from GET /api/v1/models (or resolved via /models/traits). Prefer the cheapest suitable model unless the user asks otherwise.

200 response shapes are recorded from live probes (outputFixtures) and stamped onto OpenAPI responses.200 / Bazaar info.output. Do not invent field names. Observed JSON (not exhaustive):

PathBody keys (live)
audio/transcriptionstext (optional duration)
audio/voicesid, model — not voice_id
augment/scrapeurl, content, format
augment/text-parsertext, tokens — not pages
video/transcriptionstranscript, lang
chat/completionsOpenAI chat envelope; thinking models may leave content empty (see below). May include venice_parameters, cost.

Edit / upscale / background-remove / audio/speech → raw binary (image/png or audio/*).

Reasoning / thinking models

Venice thinking models (e.g. GLM, Kimi, Claude Opus, GPT-5.4 Pro variants) may return more than choices[0].message.content:

FieldMeaning
message.contentFinal assistant text (may be "")
message.reasoning_contentChain-of-thought text when thinking is visible
message.reasoning_detailsStructured thought signatures — round-trip unchanged on the next turn for tool use

Do not treat empty content alone as failure. If reasoning_content or reasoning_details is present, the completion succeeded. With a small max_tokens / max_completion_tokens, thinking can consume the whole budget (finish_reason: "length") and leave content empty.

Controls (request venice_parameters):

ParamEffect
disable_thinking: trueSkip chain-of-thought; force a normal content reply
strip_thinking_response: trueRun thinking server-side but hide it from the client

Example — smoke / ping that always wants visible text:

{
  "model": "zai-org-glm-4.7",
  "messages": [{ "role": "user", "content": "ping" }],
  "max_tokens": 128,
  "venice_parameters": { "disable_thinking": true }
}

For long music/video generation, use the async lifecycle instead of sync TTS.