Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DeAPI SDK configuration
# deAPI SDK configuration
# Copy this file to .env and fill in your values.
# Create an API key in your dashboard at https://deapi.ai
# Key format: sk-dp-<id>-<secret> (older "<id>|<secret>" keys keep working).
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 DeAPI Team
Copyright (c) 2024 deAPI Team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DeAPI Python SDK
# deAPI Python SDK

[![CI](https://github.com/deapi-ai/deapi-python-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/deapi-ai/deapi-python-sdk/actions/workflows/ci.yml)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

Official Python SDK for the [DeAPI](https://deapi.ai) distributed AI inference platform. API details live in the [DeAPI docs](https://docs.deapi.ai).
Official Python SDK for the [deAPI](https://deapi.ai) distributed AI inference platform. API details live in the [deAPI docs](https://docs.deapi.ai).

Generate images, videos, audio, transcriptions, embeddings, and more — all through a clean, type-safe Python interface with sync and async support.

Expand Down Expand Up @@ -56,7 +56,7 @@ pytest # unit tests only; `pytest -m integration` runs paid

## API keys

Create a key in your [DeAPI dashboard](https://deapi.ai). Current keys look like
Create a key in your [deAPI dashboard](https://deapi.ai). Current keys look like
`sk-dp-<id>-<secret>` (older `<id>|<secret>` keys keep working). Keep them out of source control:
use an environment variable or a `.env` file (see [`.env.example`](.env.example)).

Expand Down Expand Up @@ -215,7 +215,7 @@ from pathlib import Path

# Text-to-speech
job = client.audio.synthesize(
text="Hello, welcome to DeAPI!",
text="Hello, welcome to deAPI!",
model="Kokoro",
voice="af_sky",
lang="en-us",
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DeAPI Python SDK — API Reference
# deAPI Python SDK — API Reference

Reference for the classes, methods and types in the `deapi_sdk` package. It describes deAPI API **v2**, the only version supported since 0.4.0 (see
[Upgrading to 0.5.0](../README.md#upgrading-to-050) and [Upgrading to 0.4.0](../README.md#upgrading-to-040) for the breaking changes). The HTTP API itself is documented at <https://docs.deapi.ai>.
Expand Down
4 changes: 2 additions & 2 deletions examples/tts_and_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

print("Generating speech...")
job = client.audio.synthesize(
text="Hello! Welcome to DeAPI, the distributed AI inference platform.",
text="Hello! Welcome to deAPI, the distributed AI inference platform.",
model="Kokoro",
voice="af_sky",
lang="en-us",
Expand Down Expand Up @@ -54,7 +54,7 @@
format="mp3",
speed=1.0,
sample_rate=24000,
text="Hello! Welcome to DeAPI.",
text="Hello! Welcome to deAPI.",
)
print(f"\nTTS price: ${price.price}")

Expand Down
4 changes: 2 additions & 2 deletions examples/webhook_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Webhook server example.

Demonstrates how to receive and verify DeAPI webhook notifications
Demonstrates how to receive and verify deAPI webhook notifications
using Flask. Works with FastAPI too (see comments).

Usage:
Expand All @@ -24,7 +24,7 @@

@app.route("/webhooks/deapi", methods=["POST"])
def handle_webhook() -> tuple:
"""Handle incoming DeAPI webhook notifications."""
"""Handle incoming deAPI webhook notifications."""
payload = request.get_data()

# Extract security headers
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ build-backend = "hatchling.build"
[project]
name = "deapi-sdk"
version = "0.6.0"
description = "Official Python SDK for DeAPI — distributed AI inference platform"
description = "Official Python SDK for deAPI — distributed AI inference platform"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
{ name = "DeAPI Team" },
{ name = "deAPI Team" },
]
keywords = ["deapi", "ai", "inference", "sdk", "stable-diffusion", "whisper", "tts"]
classifiers = [
Expand Down
6 changes: 3 additions & 3 deletions src/deapi_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""DeAPI Python SDK — Official client for the DeAPI distributed AI inference platform."""
"""deAPI Python SDK — Official client for the deAPI distributed AI inference platform."""

from __future__ import annotations

Expand Down Expand Up @@ -115,7 +115,7 @@ def _attach_resources_async(client: AsyncDeapiClient) -> None:


class DeapiClient:
"""Synchronous DeAPI client.
"""Synchronous deAPI client.

``fill_model_defaults`` (default on; env ``DEAPI_FILL_MODEL_DEFAULTS=0`` disables): generation
parameters you leave unset (width, height, steps, frames, fps, lang, ...) are taken from the
Expand Down Expand Up @@ -234,7 +234,7 @@ def __exit__(self, *args: Any) -> None:


class AsyncDeapiClient:
"""Asynchronous DeAPI client.
"""Asynchronous deAPI client.

Takes the same ``fill_model_defaults`` option as :class:`DeapiClient`.

Expand Down
2 changes: 1 addition & 1 deletion src/deapi_sdk/webhook.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Webhook signature verification for DeAPI webhook events."""
"""Webhook signature verification for deAPI webhook events."""
from __future__ import annotations

import hashlib
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Integration tests that run against the production DeAPI server.
"""Integration tests that run against the production deAPI server.

These tests are excluded by default (``addopts = "-m 'not integration'"`` in pyproject.toml).
Run them explicitly:
Expand Down