morigraph Developer Docs

Reference

Every tool is called the same way: POST https://api.morigraph.com/v1/tools/{name} with the arguments as the JSON body, or morigraph call {name}.

The list your key can call, with current prices and whether your workspace has each tool switched on, always comes from the API:

curl https://api.morigraph.com/v1/tools -H "Authorization: Bearer $MORIGRAPH_API_KEY"

The argument tables below are generated from the same schemas the service validates against.

Arguments every tool takes

Each tool can be served by more than one provider. These optional arguments steer the choice:

ArgumentValuesMeaning
costlow, medium, highThe most you will pay. Default medium
depthbasic, standard, premiumThe least quality you accept. Default standard
speedfast, balanced, slow_okHow long you will wait. Default balanced
providerA provider keyPin one provider. The tool's description from GET /v1/tools lists the keys

Files in and out

  • Inputs. An argument that takes a file, such as image or source_image, must be a public https:// URL. Transcription is the one exception: it also accepts the file itself as the request body. Files saved in your workspace cannot be used with an API key.
  • Outputs. Generated images and videos are saved to your workspace's Files, where your team can see them, and the response carries a download link in output.data: image_url for images, download_url for videos. Links expire; expires_at says when. Download what you need to keep.

Jobs

A tool marked as returning a job answers with HTTP 202, status: "pending" and job.id. Check GET /v1/jobs/{id} until status is completed or failed, waiting at least five seconds between checks. Checking is free. Credits are reserved when the job starts and settled when it finishes; a failed job releases them.

POST /v1/tools/web_search

ArgumentTypeRequiredDescription
querystringyesWhat to search for, as a natural question or keywords.
num_resultsintegernoHow many results (1-10). Default 5.
include_domainsarray of stringnoOnly results from these domains.
exclude_domainsarray of stringnoNever results from these domains.
recencyday, week, month, yearnoOnly results newer than this.
contentssnippets, fullnoExcerpts, or fuller page text where the provider supports it.
newsbooleannoSearch news articles only, with publisher and date. Best with recency. Default false.

Image generation: image_gen

POST /v1/tools/image_gen

ArgumentTypeRequiredDescription
promptstringyesWhat to generate, described in words.
modelstringnoPin an exact model from the provider offerings, e.g. dola-seedream-5-0-pro-260628 or seedream-5-0-lite-260128.
negative_promptstringnoWhat to avoid, where the provider supports it.
sizesquare, portrait, landscape, widenoAspect of the image. Default "square".
resolutiondraft, standard, highnodraft is smallest and always fits a terminal host. Default "standard".
nintegernoHow many images (1-4). Default 1.
seedintegernoFor a reproducible image, where the model supports it.
want_linkbooleannoPrefer a provider that returns a hosted URL for the full render. Default true.

Image editing: image_edit

POST /v1/tools/image_edit

ArgumentTypeRequiredDescription
imagestringyesThe image to change: a Files id or filename (e.g. a photo the person sent, or an earlier render), or an https URL. Through the API: a public https URL only.
instructionstringyesWhat to do, in the person's words: 'unblur this', 'make it 4x bigger', 'remove the background', 'take out the car', 'make the sky a sunset'.
operationauto, enhance, upscale, remove_background, erase, editnoenhance = upscale and clean up (it does not undo heavy motion blur); upscale = make it bigger; remove_background; erase = remove something (say what in target); edit = change or restyle it. auto picks from the instruction. Default "auto".
targetstringnoFor erase, or an edit that swaps one thing: what in the image to find, e.g. 'the car'.
scenestringnoWhat the picture shows, in a few words, as you see it. For erase, describe it WITHOUT the thing being removed ('an empty canoe on a calm lake, pine forest'). Makes erase and edit far more faithful; pass it whenever you can see the image.
formatjpeg, pngnoOutput format. remove_background is always png (transparent).

Video generation: video_gen

POST /v1/tools/video_gen. Returns a job.

ArgumentTypeRequiredDescription
task_modereference, editnoreference creates a new video; edit (Seedance 2.5) modifies source_video and retains its duration/aspect. For edit, omit duration_seconds and aspect; use a 4–30 second source video. Default "reference".
promptstringnoDescribe the video and motion. Required for a new generation.
modeldreamina-seedance-2-0-260128, dreamina-seedance-2-5-260628noPin an exact Seedance model.
duration_secondsintegernoDefault 4.
aspect16:9, 9:16, 1:1, adaptivenoDefault "16:9".
resolution480p, 720pnoDefault "720p".
source_imagestringnoOriginal https provider image URL, asset:// provider asset ID, or workspace Files id/filename. Portrait acceptance is provider-controlled; same-account untouched Seedream originals may qualify. Through the API: a public https URL only.
source_imagesarray of stringnoOrdered image references: 1–30 for Seedance 2.5, 1–9 for 2.0. Each accepts an https URL, asset:// ID or workspace Files id/filename. Always reference_image mode; cannot combine with source_image. Can combine with source_video. Refer to Image 1, Image 2 etc. in the prompt; portrait eligibility remains provider-controlled. Through the API: a public https URL only.
image_rolefirst_frame, reference_imagenoApplies to singular source_image only. first_frame locks the opening image. reference_image supplies character/scene identity while the prompt defines a new outfit, pose or angle; use original eligible assets. Default "first_frame".
source_videostringnoHttps reference video URL, asset:// provider asset ID, or workspace Files id/filename, for identity, scene or motion reference. Through the API: a public https URL only.
return_last_framebooleannoSave the provider-returned final frame as an untouched image in Files, for eligible future references. This is not a locally extracted screenshot. Default false.
audiofalsenoSilent output only in this release. Default false.

Transcription: audio_transcribe

POST /v1/tools/audio_transcribe

Send the audio one of two ways, the same two a transcription API such as Deepgram's takes:

  • A link. A JSON body with url, plus any options below.
  • The file itself. The file's bytes as the request body, with Content-Type set to its type (audio/mpeg, audio/wav, video/mp4, or application/octet-stream), up to 25 MB. Options go in the query string: ?language=en&diarize=false. From the CLI: morigraph call audio_transcribe --file meeting.mp3.

The price is per minute of audio, known before anything is charged because the recording is measured first. output.text is the transcript; output.data.segments has a start time, end time and speaker for each line.

ArgumentTypeRequiredDescription
urlstringnoPublic https link to an audio or video file. Up to 30 minutes and 100 MB. Leave it out when you upload the file as the request body.
languagestringnomulti for supported mixed-language speech (default; excludes Mandarin), auto for single-language detection, or a supported language code.
diarizebooleannoReturn numbered speaker labels where detected; labels are not identities. Default true.

Web page scraping: web_scrape

POST /v1/tools/web_scrape. Free.

ArgumentTypeRequiredDescription
urlsarray of stringyes1-10 public page URLs to read (http or https).
formatmarkdown, htmlnoPage text as markdown (default) or HTML.
linksbooleannoAlso list the links on each page, to follow up. Default false.
focusstringnoA question: prefer answering passages when supported. If focused extraction is unavailable, return capped page text and say so.
max_charsintegernoCharacters of text per page (default 8000); longer pages are cut and say so.

Prediction markets: prediction_markets

POST /v1/tools/prediction_markets. Free.

ArgumentTypeRequiredDescription
opsearch, odds, history, orderbookyessearch = find open markets by words; odds = one event's current odds; history = how one outcome's odds moved; orderbook = bids and asks for one outcome.
querystringnoFor search: the question in plain words, e.g. 'fed rate cut december'.
idstringnoFor odds, history, orderbook: a market or outcome id from an earlier result, or a polymarket.com / kalshi.com link the user pasted.
venuepolymarket, kalshinoOnly this venue. Omit to search both.
limitintegernoFor search: events per venue (1-10, default 5).
range1d, 1w, 1m, maxnoFor history: the window. Default "1w".

Perpetual futures: perpetuals

POST /v1/tools/perpetuals. Free.

ArgumentTypeRequiredDescription
opmarkets, quote, funding, history, orderbookyesmarkets = screen perps across venues; quote = one asset on every venue; funding = funding rates compared (optionally with history); history = price candles; orderbook = bids and asks.
assetstringnoThe coin, e.g. 'ETH', 'pepe'. Venue symbols like 1000PEPEUSDT or kPEPE work too.
venuehyperliquid, binance, bybitnoOnly this venue. Omit for all three (history and orderbook default to hyperliquid).
sortopen_interest, volume, funding_high, funding_low, changenoFor markets: how to rank. Default "open_interest".
limitintegernoFor markets: rows (default 20, max 50). For history: candles (default 100, max 1000).
history_range1d, 1w, 1mnoFor funding: also return past funding over this window.
interval1m, 5m, 15m, 1h, 4h, 1dnoFor history: candle size. Default "1h".

Free tools

Web page scraping and the two market-data tools cost no credits. They are rate limited instead: 10 calls a minute and 200 a day for each workspace, counted across all of its keys. Past the limit the API answers 429 rate_limited with a Retry-After header. GET /v1/tools shows them with a price of 0, and the CLI does not ask for --yes.

Not available

Photo and video editing work on files saved in a workspace, which an API key cannot reach. They are available through the MCP connection. Text to speech is not launched yet.