|
803 | 803 | "total_tokens"
|
804 | 804 | ]
|
805 | 805 | },
|
806 |
| - "ImageGenerationOptions": { |
807 |
| - "type": "object", |
808 |
| - "properties": { |
809 |
| - "prompt": { |
810 |
| - "type": "string", |
811 |
| - "description": "A description of the desired images." |
812 |
| - }, |
813 |
| - "n": { |
814 |
| - "type": "integer", |
815 |
| - "format": "int32", |
816 |
| - "description": "The number of images to generate (defaults to 1).", |
817 |
| - "default": 1 |
818 |
| - }, |
819 |
| - "size": { |
820 |
| - "$ref": "#/definitions/ImageSize", |
821 |
| - "description": "The desired size of the generated images. Must be one of 256x256, 512x512, or 1024x1024 (defaults to 1024x1024).", |
822 |
| - "default": "1024x1024" |
823 |
| - }, |
824 |
| - "user": { |
825 |
| - "type": "string", |
826 |
| - "description": "A unique identifier representing your end-user, which can help to monitor and detect abuse." |
827 |
| - } |
828 |
| - }, |
829 |
| - "description": "Represents the request data used to generate images.", |
830 |
| - "required": [ |
831 |
| - "prompt" |
832 |
| - ] |
833 |
| - }, |
834 |
| - "ImageLocation": { |
835 |
| - "type": "object", |
836 |
| - "properties": { |
837 |
| - "url": { |
838 |
| - "type": "string", |
839 |
| - "format": "uri", |
840 |
| - "description": "The URL that provides temporary access to download the generated image." |
841 |
| - }, |
842 |
| - "error": { |
843 |
| - "$ref": "#/definitions/Azure.Core.Foundations.Error", |
844 |
| - "description": "The error if the operation failed." |
845 |
| - } |
846 |
| - }, |
847 |
| - "description": "The image url if successful, and an error otherwise." |
848 |
| - }, |
849 |
| - "ImageOperationResponse": { |
850 |
| - "type": "object", |
851 |
| - "properties": { |
852 |
| - "id": { |
853 |
| - "type": "string", |
854 |
| - "description": "The ID of the operation." |
855 |
| - }, |
856 |
| - "created": { |
857 |
| - "type": "integer", |
858 |
| - "format": "int64", |
859 |
| - "description": "A timestamp when this job or item was created (in unix epochs)." |
860 |
| - }, |
861 |
| - "expires": { |
862 |
| - "type": "integer", |
863 |
| - "format": "int64", |
864 |
| - "description": "A timestamp when this operation and its associated images expire and will be deleted (in unix epochs)." |
865 |
| - }, |
866 |
| - "result": { |
867 |
| - "$ref": "#/definitions/ImageResponse", |
868 |
| - "description": "The result of the operation if the operation succeeded." |
869 |
| - }, |
870 |
| - "status": { |
871 |
| - "$ref": "#/definitions/State", |
872 |
| - "description": "The status of the operation" |
873 |
| - }, |
874 |
| - "error": { |
875 |
| - "$ref": "#/definitions/Azure.Core.Foundations.Error", |
876 |
| - "description": "The error if the operation failed." |
877 |
| - } |
878 |
| - }, |
879 |
| - "description": "The result of the operation if the operation succeeded.", |
880 |
| - "required": [ |
881 |
| - "id", |
882 |
| - "created", |
883 |
| - "status" |
884 |
| - ] |
885 |
| - }, |
886 |
| - "ImageOperationStatus": { |
887 |
| - "type": "object", |
888 |
| - "properties": { |
889 |
| - "id": { |
890 |
| - "type": "string", |
891 |
| - "description": "The unique ID of the operation.", |
892 |
| - "x-ms-mutability": [ |
893 |
| - "read" |
894 |
| - ] |
895 |
| - }, |
896 |
| - "status": { |
897 |
| - "$ref": "#/definitions/State", |
898 |
| - "description": "The status of the operation" |
899 |
| - } |
900 |
| - }, |
901 |
| - "description": "Provides status details for long running operations.", |
902 |
| - "required": [ |
903 |
| - "id", |
904 |
| - "status" |
905 |
| - ] |
906 |
| - }, |
907 |
| - "ImageResponse": { |
908 |
| - "type": "object", |
909 |
| - "properties": { |
910 |
| - "created": { |
911 |
| - "type": "integer", |
912 |
| - "format": "int64", |
913 |
| - "description": "A timestamp when this job or item was created (in unix epochs)." |
914 |
| - }, |
915 |
| - "data": { |
916 |
| - "type": "array", |
917 |
| - "items": { |
918 |
| - "$ref": "#/definitions/ImageLocation" |
919 |
| - }, |
920 |
| - "x-ms-identifiers": [], |
921 |
| - "description": "The images generated by the operator.", |
922 |
| - "x-typespec-name": "ImageLocation[]" |
923 |
| - } |
924 |
| - }, |
925 |
| - "description": "The result of the operation if the operation succeeded.", |
926 |
| - "required": [ |
927 |
| - "created", |
928 |
| - "data" |
929 |
| - ] |
930 |
| - }, |
931 |
| - "ImageSize": { |
932 |
| - "type": "string", |
933 |
| - "description": "The desired size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.", |
934 |
| - "enum": [ |
935 |
| - "256x256", |
936 |
| - "512x512", |
937 |
| - "1024x1024" |
938 |
| - ], |
939 |
| - "x-ms-enum": { |
940 |
| - "name": "ImageSize", |
941 |
| - "modelAsString": true, |
942 |
| - "values": [ |
943 |
| - { |
944 |
| - "name": "Size256x256", |
945 |
| - "value": "256x256", |
946 |
| - "description": "Image size of 256x256." |
947 |
| - }, |
948 |
| - { |
949 |
| - "name": "Size512x512", |
950 |
| - "value": "512x512", |
951 |
| - "description": "Image size of 512x512." |
952 |
| - }, |
953 |
| - { |
954 |
| - "name": "Size1024x1024", |
955 |
| - "value": "1024x1024", |
956 |
| - "description": "Image size of 1024x1024." |
957 |
| - } |
958 |
| - ] |
959 |
| - } |
960 |
| - }, |
961 | 806 | "ServiceApiVersions": {
|
962 | 807 | "type": "string",
|
963 | 808 | "enum": [
|
|
983 | 828 | }
|
984 | 829 | ]
|
985 | 830 | }
|
986 |
| - }, |
987 |
| - "State": { |
988 |
| - "type": "string", |
989 |
| - "description": "The state of a job or item.", |
990 |
| - "enum": [ |
991 |
| - "notRunning", |
992 |
| - "running", |
993 |
| - "succeeded", |
994 |
| - "canceled", |
995 |
| - "failed", |
996 |
| - "deleted" |
997 |
| - ], |
998 |
| - "x-ms-enum": { |
999 |
| - "name": "State", |
1000 |
| - "modelAsString": true, |
1001 |
| - "values": [ |
1002 |
| - { |
1003 |
| - "name": "notRunning", |
1004 |
| - "value": "notRunning", |
1005 |
| - "description": "The operation was created and is queued to be processed in the future." |
1006 |
| - }, |
1007 |
| - { |
1008 |
| - "name": "running", |
1009 |
| - "value": "running", |
1010 |
| - "description": "The operation has started to be processed." |
1011 |
| - }, |
1012 |
| - { |
1013 |
| - "name": "succeeded", |
1014 |
| - "value": "succeeded", |
1015 |
| - "description": "The operation has successfully be processed and is ready for consumption." |
1016 |
| - }, |
1017 |
| - { |
1018 |
| - "name": "canceled", |
1019 |
| - "value": "canceled", |
1020 |
| - "description": "The operation has been canceled and is incomplete." |
1021 |
| - }, |
1022 |
| - { |
1023 |
| - "name": "failed", |
1024 |
| - "value": "failed", |
1025 |
| - "description": "The operation has completed processing with a failure and cannot be further consumed." |
1026 |
| - }, |
1027 |
| - { |
1028 |
| - "name": "deleted", |
1029 |
| - "value": "deleted", |
1030 |
| - "description": "The entity has been deleted but may still be referenced by other entities predating the deletion." |
1031 |
| - } |
1032 |
| - ] |
1033 |
| - } |
1034 | 831 | }
|
1035 | 832 | },
|
1036 | 833 | "parameters": {
|
|
0 commit comments