-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Add ideogram-v3 POST endpoints and schema updates to API spec #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe changes update the Ideogram API OpenAPI specification by introducing four new POST endpoints for version 3.0. These endpoints ( Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API_Server
participant Image_Service
Client->>API_Server: POST /v1/generate/ideogram-v3 (request payload)
API_Server->>Image_Service: Process image generation request
Image_Service-->>API_Server: Return generated image details
API_Server-->>Client: JSON response with image data
Possibly related PRs
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
src/libs/Ideogram/openapi.yaml (4)
575-613: New Endpoint:/v1/reframe/ideogram-v3for Ideogram 3.0 Reframing
The reframing endpoint is implemented similarly to the other new endpoints, correctly referencing the newReframeImageRequestV3and using multipart/form-data. The description is comprehensive; however, consider adding an example in the documentation to clarify acceptable resolution inputs.
732-783: New Schema:GenerateImageRequestV3
The schema for generating images in version 3.0 is defined with appropriate requirements—most notably, thepromptfield is required and various optional parameters (likeseed,resolution,aspect_ratio, etc.) are provided with proper constraints and examples. Consider verifying that the default values and examples align with production expectations.
1155-1188: New Schema:ImageGenerationResponseV3
The response schema for version 3.0 image generation neatly encapsulates the response details, including thecreatedtimestamp and an array of generated images. The provided example is detailed, though you might consider truncating long URL examples or referencing documentation for clarity.
1189-1230: New Schema:ImageGenerationObjectV3
This schema outlines the structure of the generated image objects with mandatory fields such asis_image_safe,prompt,resolution, andseed. The example illustrates expected values well. A minor suggestion is to provide additional commentary on optional fields if any nuances exist in their usage.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (36)
src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostEditImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostGenerateImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostReframeImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.GenerateClient.PostRemixImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostEditImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostGenerateImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostReframeImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.IGenerateClient.PostRemixImageV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.AspectRatioV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ColorPaletteWithPresetNameOrMembers.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.EditImageRequestV3.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.EditImageRequestV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.GenerateImageRequestV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationObjectV3.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationObjectV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationResponseV3.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ImageGenerationResponseV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ReframeImageRequestV3.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ReframeImageRequestV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequestV3.Json.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.RemixImageRequestV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.RenderingSpeed.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.ResolutionV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/Ideogram.Models.StyleTypeV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.AspectRatioV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.AspectRatioV3Nullable.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.RenderingSpeed.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.RenderingSpeedNullable.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.ResolutionV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.ResolutionV3Nullable.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.StyleTypeV3.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonConverters.StyleTypeV3Nullable.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/Ideogram/Generated/JsonSerializerContextTypes.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Ideogram/openapi.yaml(7 hunks)
🔇 Additional comments (6)
src/libs/Ideogram/openapi.yaml (6)
494-532: New Endpoint:/v1/edit/ideogram-v3for Ideogram 3.0 Edit Operation
This endpoint is well structured and mirrors the pattern of existing endpoints while targeting the new Ideogram 3.0 functionality. It correctly uses multipart/form-data with a reference to the newEditImageRequestV3schema and returns responses usingImageGenerationResponseV3. Please verify that the controller mapping (generate_controller) is updated to handle version 3.0 requests and that any clients consuming the API are aware of the new operationId (post_edit_image_v3).
533-574: New Endpoint:/v1/generate/ideogram-v3for Ideogram 3.0 Image Generation
This new generate endpoint supports both multipart/form-data and application/json, offering flexibility for clients. The inclusion of an encoding block forcolor_paletteis a thoughtful addition. Ensure that the dual-content-type support is clearly documented for API consumers, and verify that the new controller implementation properly distinguishes between the request content types.
614-652: New Endpoint:/v1/remix/ideogram-v3for Ideogram 3.0 Remixing
This endpoint provides robust support for remixing images using the new Ideogram 3.0 model. It enforces required fields and includes proper encoding forcolor_palettein its multipart/form-data section. The response and error conditions mirror those of the other endpoints, ensuring consistency.
784-835: New Schema:RemixImageRequestV3
This schema effectively captures the necessary fields for remixing alongside optional parameters (e.g.,image_weight). The validation constraints on fields such asimage_weight(with a range of 1 to 100) help ensure robust requests. The structure is clear and consistent with the new endpoints.
836-872: New Schema:EditImageRequestV3
TheEditImageRequestV3schema correctly requires theimage_file,mask, andpromptfields, which are critical for the editing operation. Additional optional fields such asmagic_promptandnum_imagesfurther enhance its capabilities. Ensure that the descriptions and examples are fully in sync with the endpoint behavior.
873-900: New Schema:ReframeImageRequestV3
This schema cleanly defines the reframing request, mandating bothimage_fileandresolutionwhile also allowing optional parameters likenum_imagesandseed. The use of the$reftoResolutionV3ensures consistency with the new resolution options.
Summary by CodeRabbit