Skip to content

feat: add deAPI provider#1855

Open
adampachowicz wants to merge 4 commits into
anomalyco:devfrom
deapi-ai:add-deapi-provider
Open

feat: add deAPI provider#1855
adampachowicz wants to merge 4 commits into
anomalyco:devfrom
deapi-ai:add-deapi-provider

Conversation

@adampachowicz
Copy link
Copy Markdown

@adampachowicz adampachowicz commented May 25, 2026

Summary

Adds deAPI as a provider — OpenAI-compatible inference API for open-source AI models served on decentralized GPU infrastructure (https://oai.deapi.ai/v1).

Provider uses npm = "@ai-sdk/openai-compatible" (no dedicated SDK published yet).

This PR is intentionally scoped to deAPI's embeddings + image-generation catalog. Other modalities deAPI offers (TTS, transcription, OCR, video, image editing, upscaling, music) are out of scope here and will follow in a separate PR.

Models

Filenames match deAPI's canonical case-sensitive API slugs (verified via GET /api/v2/models) so consumer-side model parameters resolve correctly at the upstream API.

  • Bge_M3_FP16 — embedding (family = "bge", [cost] per million tokens, follows openai/text-embedding-3-small.toml pattern)
  • Flux1schnell — text-to-image (family = "flux")
  • Flux_2_Klein_4B_BF16 — text-to-image + multi-reference editing (family = "flux", attachment = true)
  • ZImageTurbo_INT8 — text-to-image (family = "z-image")
  • ZAnimeDistill_8Step_INT8 — text-to-image, anime style (family = "z-image")

Image models follow the openai/gpt-image-1.toml pattern: [limit] zeroed, [cost] omitted.

Files

  • providers/deapi/provider.toml
  • providers/deapi/logo.svg
  • providers/deapi/models/Bge_M3_FP16.toml
  • providers/deapi/models/Flux1schnell.toml
  • providers/deapi/models/Flux_2_Klein_4B_BF16.toml
  • providers/deapi/models/ZImageTurbo_INT8.toml
  • providers/deapi/models/ZAnimeDistill_8Step_INT8.toml
  • packages/core/src/family.ts — adds "z-image" to the family enum (used by the two Z-Image models above)

Validation

bun validate passes locally (exit 0); all 5 models appear in the generated output with correct id/family/modalities.

Links

- Rename all model files to match exact deAPI native slugs so consumers
  (OpenCode, Vercel AI SDK) send the correct model identifier to
  https://oai.deapi.ai/v1 (model id is auto-derived from filename):
    bge-m3-fp16        -> Bge_M3_FP16
    flux1schnell       -> Flux1schnell
    flux2klein4b       -> Flux_2_Klein_4B_BF16
    z-image-turbo      -> ZImageTurbo_INT8
    z-anime            -> ZAnimeDistill_8Step_INT8
- Add "z-image" to packages/core/src/family.ts enum so Z-Image models
  can be properly classified.
- Correct Z-Image release dates:
    ZImageTurbo_INT8:           2025-03-15 -> 2025-11-26 (Tongyi Lab)
    ZAnimeDistill_8Step_INT8:   2025-03-15 -> 2025-12-28
Comment thread providers/deapi/logo.svg
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isnt right is it? If it's a copy of the openai logo then i assume this provider is a scam

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're 100% right to flag this — that file was not our logo, and I'm sorry it landed on the PR. It looks like our original asset was scraped/replaced incorrectly before we cut this PR.

Fixed in a579768 — pushed just now. The new providers/deapi/logo.svg is the official deAPI chip glyph from our brand system: a pixel-art frame with a center slash, in currentColor only (amber #FFBA00 is the in-product accent; here it's color-neutral so models.dev can theme it).

You can cross-reference the same path data here on our marketing site:

  • https://deapi.ai — logo in the header
  • Source: resources/v2/assets/logo.svg (chip-glyph subpath, first <path>)

deAPI is a real provider operated by GamerHash — same org as the @gamerhash GitHub. We're also opening a parallel registration PR at BerriAI/litellm#28787 with full company context. Happy to provide anything else you need to clear the scam concern — totally understand the flag, definitely not the impression we wanted to make.

Reviewer correctly flagged that the previous logo.svg was not the
deAPI brand mark. The chip glyph below is taken from the deAPI brand
system (pixel-art frame with center slash, amber #FFBA00 in product
contexts; here exported as a flat icon-only path with currentColor so
models.dev can theme it light/dark).

- Path data sourced from the official deAPI marketing site
  (resources/v2/assets/logo.svg, chip-glyph subpath).
- Centered inside viewBox="0 0 40 40" via translate(5.4525, 4)
  so the 29.095x32 chip art is padded evenly (~5.45px / 4px).
- Single currentColor fill, no embedded color tokens, no defs.

Apologies to the maintainer — that was a sourcing mistake on our
end, not a misrepresentation of the provider.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants