deeprelay-sdk
Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
Keys minted from the dashboard or deeprelay login belong to the
Production server, https://api.deeprelay.ai/v1. The Demo server is an
internal staging environment with its own key store.
Versioning: /v1 is the API version. info.version is the revision of
this /v1 document, not a separate API.
OpenAI compatibility: chat completions follow the OpenAI request and
response shapes, but not every OpenAI parameter is carried. Some are
rejected with 400 unsupported_parameter and any parameter not declared
in this spec is accepted and ignored. The full table is at
https://deeprelay.ai/docs/api/inference#openai-compatibility.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 0.4.0
- Generator version: 7.24.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.10+
Installation & Usage
pip install
Install from PyPI with pip install deeprelay-sdk, or straight from the public source mirror:
pip install git+https://github.com/deeprelay-dev/deeprelay-python-sdk.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/deeprelay-dev/deeprelay-python-sdk.git)
Then import the package:
import deeprelay_sdk
Setuptools
Install from a mirror checkout (run from the checkout root):
pip install --user .
(or sudo pip install . to install the package for all users)
Then import the package:
import deeprelay_sdk
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import os
import deeprelay_sdk
from deeprelay_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.deeprelay.ai/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = deeprelay_sdk.Configuration(
host = "https://api.deeprelay.ai/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (deeprelay_live_<24-base62>): bearerAuth
configuration = deeprelay_sdk.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with deeprelay_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = deeprelay_sdk.AlertsApi(api_client)
try:
# Get the organization's alert settings
api_response = api_instance.get_alert_settings()
print("The response of AlertsApi->get_alert_settings:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling AlertsApi->get_alert_settings: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api.deeprelay.ai/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AlertsApi | get_alert_settings | GET /alerts/settings | Get the organization's alert settings |
| AlertsApi | put_alert_settings | PUT /alerts/settings | Replace the organization's alert settings |
| ApiKeysApi | create_api_key | POST /api-keys | Create an API key |
| ApiKeysApi | get_api_key | GET /api-keys/{id} | Get an API key |
| ApiKeysApi | list_api_keys | GET /api-keys | List API keys |
| ApiKeysApi | revoke_api_key | DELETE /api-keys/{id} | Revoke an API key |
| ApiKeysApi | update_api_key | PATCH /api-keys/{id} | Update an API key's name or limits |
| BillingApi | create_crypto_deposit | POST /billing/deposits/crypto | Create a stablecoin deposit |
| BillingApi | create_subscription_checkout | POST /billing/subscription/checkout | Start a subscription checkout session |
| BillingApi | create_subscription_portal | POST /billing/subscription/portal | Open the billing portal to cancel or manage the subscription |
| BillingApi | delete_spending_limit | DELETE /billing/spending-limit | Clear the org spending limit |
| BillingApi | get_balance | GET /billing/balance | Get the org credit balance |
| BillingApi | get_deposit | GET /billing/deposits/{id} | Get one stablecoin deposit |
| BillingApi | get_referral | GET /referrals | Get the org referral code, invite link, terms and stats |
| BillingApi | get_spending_limit | GET /billing/spending-limit | Get the org spending limit |
| BillingApi | get_subscription | GET /billing/subscription | Get the org subscription status and quota usage |
| BillingApi | list_deposits | GET /billing/deposits | List stablecoin deposits |
| BillingApi | update_spending_limit | PUT /billing/spending-limit | Set the org spending limit |
| BillingApi | upgrade_subscription | POST /billing/subscription/upgrade | Upgrade the subscription to a bigger plan |
| InferenceApi | cancel_video | POST /videos/{id}/cancel | Cancel a video generation job |
| InferenceApi | create_chat_completion | POST /chat/completions | Create a chat completion (OpenAI-compatible) |
| InferenceApi | create_embeddings | POST /embeddings | Create embeddings (OpenAI-compatible) |
| InferenceApi | create_image | POST /images/generations | Create image (OpenAI-compatible) |
| InferenceApi | create_video | POST /videos | Create a video generation job (async) |
| InferenceApi | get_model | GET /models/{id} | Get a specific model (OpenAI-compatible) |
| InferenceApi | get_video | GET /videos/{id} | Get a video generation job |
| InferenceApi | get_video_content | GET /videos/{id}/content | Download a completed video artifact |
| InferenceApi | inference_preflight | GET /inference/preflight | Check whether a model request would be served, and at whose expense |
| InferenceApi | list_models | GET /models | List available models (OpenAI-compatible) |
| InferenceApi | list_videos | GET /videos | List video generation jobs |
| MetaApi | get_health | GET /health | Liveness probe |
| MetaApi | get_open_api_spec | GET /openapi.json | OpenAPI 3.1 specification |
| RequestsApi | export_requests | GET /requests/export | Export the request log as CSV |
| RequestsApi | get_request | GET /requests/{id} | Get one request |
| RequestsApi | list_requests | GET /requests | List requests (the request log) |
| UsageApi | list_usage | GET /usage | Time-bucketed usage |
| WebhooksApi | create_webhook_endpoint | POST /webhook-endpoints | Create a webhook endpoint |
| WebhooksApi | delete_webhook_endpoint | DELETE /webhook-endpoints/{id} | Delete a webhook endpoint |
| WebhooksApi | get_webhook_endpoint | GET /webhook-endpoints/{id} | Get a webhook endpoint |
| WebhooksApi | list_webhook_endpoints | GET /webhook-endpoints | List webhook endpoints |
Documentation For Models
- AlertEmailToggles
- AlertSettings
- AlertSettingsUpdate
- ApiKey
- ApiKeyCreate
- ApiKeyCreated
- ApiKeyList
- ApiKeyScopes
- ApiKeyUpdate
- Balance
- ChatChoice
- ChatCompletionRequest
- ChatCompletionRequestResponseFormat
- ChatCompletionRequestToolChoice
- ChatCompletionResponse
- ChatMessage
- CostDetails
- CreateCryptoDepositRequest
- CreateWebhookEndpointRequest
- CryptoDeposit
- Embedding
- EmbeddingsRequest
- EmbeddingsRequestInput
- EmbeddingsResponse
- EmbeddingsUsage
- GetHealth200Response
- ImagesGenerationsRequest
- ImagesResponse
- ImagesResponseDataInner
- ImagesResponseUsage
- InferencePreflight
- JSONSchemaFormat
- ListDeposits200Response
- Model
- ModelList
- ModelMetrics
- ModelParametersInner
- ModelPricing
- ModelRate
- OpenAIErrorEnvelope
- OpenAIErrorEnvelopeError
- PeakWindow
- Problem
- RefereeStatus
- Referral
- RequestLogEntry
- RequestLogPage
- ResponseFormatJSONObject
- ResponseFormatJSONSchema
- ResponseFormatText
- SpendingLimit
- StreamOptions
- Subscription
- SubscriptionCheckoutRequest
- SubscriptionCheckoutSession
- SubscriptionModelUsage
- SubscriptionPlan
- SubscriptionPortalRequest
- SubscriptionPortalSession
- SubscriptionPrice
- SubscriptionQuota
- SubscriptionTier
- SubscriptionUpgradeRequest
- SubscriptionUsage
- Tool
- ToolCall
- ToolCallFunction
- ToolChoiceFunction
- ToolChoiceFunctionFunction
- ToolFunction
- UpdateSpendingLimitRequest
- Usage
- UsageBucket
- UsageCompletionTokensDetails
- UsagePage
- UsagePromptTokensDetails
- VideoCreateRequest
- VideoJob
- VideoList
- WebhookEndpoint
- WebhookEndpointPage
Documentation For Authorization
Authentication schemes defined for the API:
bearerAuth
- Type: Bearer authentication (deeprelay_live_<24-base62>)
Author
Metadata
Release files for deeprelay-sdk 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| deeprelay_sdk-0.4.0.tar.gz | 118.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deeprelay_sdk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 350.4 kB
Release files / deeprelay_sdk-0.4.0.tar.gz
| Download URL | deeprelay_sdk-0.4.0.tar.gz |
|---|---|
| Size | 118.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b4af1552591cc797fbef0eb80cd2ad3f70ab1c184bb95d428489ca91e0d0289
|
|
BLAKE2b-256 checksum How to use checksums |
f71bab16b46711f9d1f90e2b5755b77c43560953744ef43ad00537c0f17938e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / deeprelay_sdk-0.4.0-py3-none-any.whl
| Download URL | deeprelay_sdk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 232.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbaf8d950fd832fef6353916cf09358cd8f7e50238d245505fe2ff3d0a4c4037
|
|
BLAKE2b-256 checksum How to use checksums |
a5c0803772c244daa92f372565882d4817be3b2404246827f32629ef73fd4a40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for deeprelay-sdk 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for deeprelay_sdk-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.