2KEN2KEN

grok-imagine-image

Per request
$0.005 / image

Playground

Input

Reference images Up to 3 · no extra 2KEN charge

Resolution

Aspect ratio

Output format

Output

The generated image will appear after you run.

Examples

Click an example to load Playground presets and jump to the trial area.

How to start

Three steps to integrate. Model ID is grok-imagine-image.

  1. 1

    Get an API key

    Create a key in the 2KEN console. Text, image, and video share one key.

  2. 2

    Point to the unified endpoint

    Set Base URL to https://api.2ken.com/v1 and model to grok-imagine-image.

  3. 3

    Generate or edit an image

    Use /v1/images/generations for text-to-image, or /v1/images/edits with a reference image.

Developer docs

API

OpenAI-compatible image API. One request returns an image URL or b64_json.

OpenAI · Images API

grok-imagine-image Image Generations

Call grok-imagine-image via the OpenAI-compatible Images API. Text-to-image uses /v1/images/generations; reference images use /v1/images/edits.

01

Endpoints

POST
Generate/v1/images/generations
Try
POST
Edit/v1/images/edits
02

Flow

  1. 1
    Bearer auth

    Send Authorization: Bearer .

  2. 2
    Submit a prompt

    Read data[0].url or data[0].b64_json.

03

Notes

  • Modelgrok-imagine-image
  • ProtocolOpenAI-compatible Images API. Use /v1/images/edits when sending reference images.
01 Generate image POST · images
curl --request POST \
  --url https://api.2ken.com/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "grok-imagine-image",
    "prompt": "A silver camera in neon rain",
    "response_format": "url"
  }'
200Image Response
{
  "created": 0,
  "data": [{"url": "https://cdn.example.com/demo.png"}]
}

Why choose 2KEN

Compatible APIs

Reuse your existing SDK by switching the base URL. Migration stays small.

One key for every model

Text, image, video, and other modalities share the same key and bill.

Transparent usage pricing

USD unit prices sit next to official references so you can estimate cost.