Skip to content
deapi-aiPublic

About

deAPI package for Pi: deAPI's MCP server and a skill for images, video, audio, transcription and OCR

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

deAPI for Pi

A Pi package that adds deAPI: image, video, speech and music generation, transcription of files and YouTube, TikTok, X, Twitch and Kick links, video description and OCR, plus deAPI's chat models as a Pi model provider.

It contains:

  • an extension that registers deAPI's hosted MCP server (https://mcp.deapi.ai/mcp) as deapi, with its tools loaded through tool search, so they do not take up context until needed;
  • the deapi model provider: deAPI's chat models (OpenAI-compatible API at https://oai.deapi.ai/v1) in /model, no models.json needed;
  • a deapi skill that tells the agent which tool fits which task, to check prices before long jobs and not to guess model names.

Install

pi install npm:@deapi/pi

Then authenticate in one of two ways:

  • API key: create one at app.deapi.ai/settings/api-keys, set DEAPI_API_KEY in your environment and start Pi.
  • Sign in: without DEAPI_API_KEY, open /mcp in Pi, select deapi and sign in.

Try: "Transcribe https://www.youtube.com/watch?v=... and summarise it" or "Make a 16:9 image of a lighthouse at dusk".

Without the package

pi mcp add deapi --url "https://mcp.deapi.ai/mcp?source=pi" --bearer-token-env-var DEAPI_API_KEY

A deapi entry in mcp.json takes precedence over the one this package registers.

Chat models

With DEAPI_API_KEY set, open /model and pick a deapi model, or start Pi with one:

pi --model deapi/seed-2.0-mini

pi --list-models deapi lists them. At startup the extension reads the model list from GET https://oai.deapi.ai/v1/models (context window, output limit, image input, reasoning and the prices for your account) and falls back to a built-in list (prices shown as 0) when the catalog does not answer within about 1.5 seconds; /model refreshes it and keeps the last list that loaded. The key can also be stored with /login instead of the environment variable.

  • Costs: Pi estimates the cost from token counts and the catalog prices. The exact charge of each request is usage.cost in the response and in your deAPI dashboard. With the built-in list (catalog not reached) the prices show as 0.
  • Thinking: /thinking maps to deAPI's reasoning_effort. off sends none (reasoning off); xhigh and max are available. glm-5.3 offers only low, high and max. Reasoning tokens count toward the output limit.
  • Retries are billed. deAPI charges every chat request it completes, also a retried one. Pi retries transient failures by default (retry.enabled in settings); turn it off if you prefer to retry by hand.
  • Only /v1/chat/completions is used; deAPI has no Responses API. Images are sent inline (base64), which deAPI accepts on the models with image input.

Notes

  • Jobs are paid from your deAPI balance. Every generation tool has a *_price twin that returns the cost without running the job.
  • Requests carry ?source=pi and an X-Deapi-Source: pi/<version> header (for example pi/0.2.1) so deAPI can see traffic from this package. Nothing about you or your prompts is added.

License

MIT

About

deAPI package for Pi: deAPI's MCP server and a skill for images, video, audio, transcription and OCR

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages