Apply production-ready Ideogram SDK patterns for TypeScript and Python. Use when implementing Ideogram integrations, refactoring SDK usage, or establishing team coding standards for Ideogram. Trigger...
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.