xAI Grok Imagine Image Quality의 전용 편집 엔드포인트입니다. 디테일을 보존하는 최고 품질 편집 티어입니다.
콘솔의 Playground에서 별도 코드 없이 이 모델을 즉시 테스트할 수 있어요
이 모델의 사용법을 Claude, ChatGPT 등에 복사
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "xai/grok-imagine-image-quality/edit",
"input": {
"prompt": "Restore this photo and enhance fine detail, keep composition",
"image": "https://example.com/old-photo.jpg"
}
}'| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
prompt | string | Yes | - | 편집 내용을 설명하는 텍스트 프롬프트입니다. |
image | string | Yes | - | 편집할 원본 이미지 URL입니다. jpg, jpeg, png를 지원합니다(최대 20MiB). |
n | integer | No | 1 | 생성할 편집 변형 수(1~10). 장당 과금됩니다. |
aspect_ratio | string | No | auto | 출력 이미지의 종횡비입니다. auto1:116:99:164:33:43:22:32:11:219.5:99:19.520:99:20 |
resolution | string | No | - | 출력 해상도 티어입니다. 2k는 더 높은 요율로 과금되며, 미지정 시 1k입니다. 1k2k |
이 모델의 image 파라미터에 파일을 전달하는 방법은 3가지입니다.
공개 접근 가능한 URL을 직접 전달합니다. Storage API(POST /v1/files/upload-url)로 업로드하면 파일이 S3로 직접 올라가고(파일당 50MB), 반환된 file_url을 그대로 쓰면 됩니다.
{
"model": "xai/grok-imagine-image-quality/edit",
"input": {
"prompt": "your prompt here",
"image": "https://example.com/image.jpg"
}
}POST /v1/predictions/upload에 파일을 직접 첨부합니다. 별도 업로드 과정이 없는 대신, 파일이 API 서버를 거치므로 요청 전체 10MB 제한이 적용됩니다.
curl -X POST "https://api.core.today/v1/predictions/upload" \
-H "X-API-Key: cdt_your_api_key" \
-F "model=xai/grok-imagine-image-quality/edit" \
-F 'input={"prompt":"your prompt here"}' \
-F "file:image=@your_file.png"POST /v1/predictions 요청 시 사용되는 공통 파라미터입니다.
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
model | string | Yes | - | 모델 식별자 |
input | object | Yes | - | 위 테이블의 모델별 파라미터를 포함하는 객체 |
output_folder | string | No | - | 결과물 저장 폴더 경로 (최대 256자, '..' 사용 불가) |
webhook_url | string | No | - | 완료 시 호출할 Webhook URL |
is_public | boolean | No | false | true 시 결과물을 영구 공개 URL로도 제공 |
구도 변경 없이 사진 복원·디테일 강화
curl -X POST "https://api.core.today/v1/predictions" \
-H "Content-Type: application/json" \
-H "X-API-Key: cdt_your_api_key" \
-d '{
"model": "xai/grok-imagine-image-quality/edit",
"input": {
"prompt": "Restore this photo and enhance fine detail, keep composition",
"image": "https://example.com/old-photo.jpg"
}
}'