算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ideogram-sdk-patterns【设计与创意】Design an owned Ideogram REST adapter for multipart uploads, typed responses, deadlines, and vendor isolation. Use when building or reviewing application client code without inventing an official SDK. Trigger with "wrap Ideogram API", "build an Ideogram client", or "review Ideogram adapter code".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Contain Ideogram transport behavior behind a small application-owned interface. Preserve endpoint-specific multipart contracts, error bodies, safety outcomes, asynchronous identifiers, and storage handoff without coupling business logic to raw vendor payloads.
Ideogram exposes REST and an OpenAPI document. Endpoint payloads are not interchangeable: V4 generation uses multipart form fields, some operations include files, and asynchronous routes return a generation identifier for later reconciliation. Avoid presenting a third-party package or local wrapper as an official Ideogram SDK.
Inject IDEOGRAM_API_KEY only inside the trusted transport adapter and send it as Api-Key to https://api.ideogram.ai. Redact headers, multipart content, prompts, image inputs, response URLs, and binary bodies from logs and exceptions.
text_prompt and json_prompt impossible to combine.is_image_safe, and unknown fields needed for drift review.Use Read, Glob, and Grep to identify existing clients and call sites. Use Write and Edit only for approved adapter, type, test, or documentation changes. Selection does not authorize package installation, live spend, or replacement of a production client.
Require review before adding dependencies, changing retry semantics, exposing new prompt or image fields, switching endpoints, enabling paid traffic, or altering durable storage. Keep vendor migration and application API compatibility decisions explicit.
400 and 422 without copying sensitive content.Return the adapter surface, endpoint map, schema version or retrieval date, retry and deadline policy, tests run, compatibility risks, live-check status, and rollback plan. Do not return credentials, prompts, image bytes, or expiring URLs.
generateV4, submitV4, getGeneration, and persistAsset as separate owned operations.429 into an application CapacityDeferred result carrying sanitized retry metadata.Run contract and call-site tests, compare multipart field names to first-party docs, inject every error class, and verify logs remain content-free. Confirm the old adapter can be restored without losing in-flight generation state.