Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 2.61 KB

File metadata and controls

61 lines (41 loc) · 2.61 KB

CLAUDE.md — Descript SDK

Overview

Auto-generated C# SDK for Descript — AI-powered video and audio editing platform API (v1.2). Import media, create projects, edit with the Underlord AI agent, manage jobs, and export published projects. OpenAPI spec downloaded from https://docs.descriptapi.com/openapi.yaml.

Build & Test

dotnet build Descript.slnx
dotnet test src/tests/IntegrationTests/

Auth

Bearer token auth (personal API token from Descript Settings > API Tokens):

var client = new DescriptClient(apiKey); // DESCRIPT_API_KEY env var

Base URL: https://descriptapi.com/v1.

Key Files

  • src/libs/Descript/openapi.yaml — OpenAPI spec (downloaded from Descript docs, OpenAPI 3.0.0)
  • src/libs/Descript/generate.sh — Downloads spec, runs autosdk with --security-scheme Http:Header:Bearer
  • src/libs/Descript/Generated/Never edit — auto-generated code (204 files)
  • src/tests/IntegrationTests/Tests.cs — Test helper with bearer auth
  • src/tests/IntegrationTests/Examples/ — Example tests (also generate docs)

Spec Notes

  • generate.sh downloads spec from https://docs.descriptapi.com/openapi.yaml
  • Spec already defines bearerAuth security scheme (http/bearer)
  • --security-scheme Http:Header:Bearer injects top-level security for AutoSDK constructor generation
  • Uses --exclude-deprecated-operations flag

Sub-client Pattern

Descript API has tagged operations generating sub-clients:

  • client.ApiEndpoints.* — Import media, agent edit, list/get/cancel jobs, check API status
  • client.EditInDescript.* — Create import URLs for "Edit in Descript" integrations
  • client.ExportFromDescript.* — Get published project metadata

Agent Edit Workflow

Two-step async pattern for AI-powered editing:

  1. Submit: client.ApiEndpoints.AgentEditJobAsync(projectId, prompt) — returns JobId and ProjectUrl
  2. Poll: client.ApiEndpoints.GetJobAsync(jobId) — check JobState (running -> stopped), then inspect Result for agent response and changes summary

Import Media Workflow

Similar async pattern for media import:

  1. Import: client.ApiEndpoints.ImportProjectMediaAsync(projectName, addMedia, addCompositions) — returns JobId, ProjectId, ProjectUrl
  2. Poll: client.ApiEndpoints.GetJobAsync(jobId) — check JobState for completion, inspect Result for media status and created compositions

MEAI Integration

No MEAI interface (IChatClient, IEmbeddingGenerator, ISpeechToTextClient) is implemented — Descript is a media editing platform with no matching MEAI interface.