For Developers

API Documentation

Use the JuheNext API through OpenAI-, Anthropic-, or Gemini-compatible formats. This reference covers authentication, parameters, request examples, and response structures for every supported endpoint group.

Quick Start

Connect to the JuheNext API

Base URL

Use this host for every endpoint in this reference.

https://api.juhenextvip.com

Authentication

Send your JuheNext API Key as a Bearer token. Some Gemini-compatible clients may use x-goog-api-key instead.

Authorization: Bearer <YOUR_API_KEY>

Keep production Keys in server-side environment variables. Never expose them in browser code or a public repository.

Chat & Responses

OpenAI, Responses, Anthropic Messages, and Gemini-compatible interfaces.

POST/v1/chat/completions

Create Chat Completion

Creates a model response from a conversation. Streaming and tool calling are supported by compatible models.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Exact model ID from the Models page.

messagesRequiredarraybody

Conversation messages in chronological order.

max_completion_tokensOptionalintegerbody

Maximum number of generated tokens.

reasoning_effortOptionalstringbody

Reasoning effort for supported reasoning models.

noneminimallowmediumhighxhighmax

temperatureOptionalnumberbody

Sampling temperature. Support varies by model.

streamOptionalbooleanbody

Returns Server-Sent Events when true.

toolsOptionalarraybody

Tools or functions available to the model.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/chat/completions' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.6-luna",
  "messages": [
    {
      "role": "developer",
      "content": "You are a helpful assistant."
    },
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}'

Response Example

JSON
{
  "id": "chatcmpl_...",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 24,
    "completion_tokens": 9,
    "total_tokens": 33
  }
}

Notes

  • For streaming, set stream to true and read events until [DONE].
POST/v1/responses

Create Response

Creates a response using the OpenAI Responses format, including instructions, reasoning, and tools.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Exact model ID.

inputRequiredstring | arraybody

Text or structured input items.

instructionsOptionalstringbody

System-level instructions for the response.

max_output_tokensOptionalintegerbody

Maximum number of output tokens.

reasoningOptionalobjectbody

Reasoning configuration for supported models.

streamOptionalbooleanbody

Streams response events when true.

toolsOptionalarraybody

Tools available during the response.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/responses' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-5.6-luna",
  "instructions": "Answer clearly and briefly.",
  "input": "Explain what an API gateway does."
}'

Response Example

JSON
{
  "id": "resp_...",
  "object": "response",
  "status": "completed",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "An API gateway is a single entry point..."
        }
      ]
    }
  ]
}
POST/v1/messages

Create Message

Creates a message using the Anthropic-compatible Messages format.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Exact compatible model ID.

messagesRequiredarraybody

Input messages for the conversation.

max_tokensRequiredintegerbody

Maximum number of generated tokens.

streamOptionalbooleanbody

Streams message events when true.

thinkingOptionalobjectbody

Extended-thinking configuration for supported models.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/messages' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the benefits of caching."
    }
  ]
}'

Response Example

JSON
{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Caching reduces latency and upstream load..."
    }
  ],
  "stop_reason": "end_turn"
}

Notes

  • Use a model that supports the Messages format. Check the live Models page before integration.
POST/v1beta/models/{model}:{GenerateContentType}

Generate Gemini Content

Creates standard or streaming content using the Gemini-compatible interface.

Parameters

NameTypeLocationDescription
modelRequiredstringpath

Gemini-compatible model ID.

GenerateContentTypeRequiredstringpath

Generation method appended after the model name.

generateContentstreamGenerateContent

contentsRequiredarraybody

Conversation content and parts.

generationConfigOptionalobjectbody

Optional sampling and output configuration.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1beta/models/gemini-3.5-flash:generateContent' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contents": [
    {
      "role": "user",
      "parts": [
        { "text": "Explain edge computing in one paragraph." }
      ]
    }
  ]
}'

Response Example

JSON
{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          { "text": "Edge computing processes data closer..." }
        ]
      },
      "finishReason": "STOP"
    }
  ]
}

Images

Generate and edit images with OpenAI- and Gemini-compatible formats.

POST/v1/images/generations

Generate Image

Generates one or more images from a text prompt.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Image-generation model ID.

promptRequiredstringbody

Description of the image to generate.

sizeOptionalstringbody

Preset size or custom WxH size supported by the model.

nOptionalintegerbody

Number of images to generate when supported.

response_formatOptionalstringbody

Image return format when supported.

urlb64_json

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/images/generations' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "gpt-image-2-c",
  "prompt": "A flying white rabbit in a futuristic sci-fi style",
  "size": "1024x1536"
}'

Response Example

JSON
{
  "created": 1785859200,
  "data": [
    {
      "url": "https://example.com/generated-image.png"
    }
  ]
}

Notes

  • For compatible custom sizes, both dimensions must be multiples of 16, the longest edge must not exceed 3840, and the aspect ratio must not exceed 3:1.
  • Model-specific parameters and limits may differ. The Models page is the live source of availability.
POST/v1/images/edits

Edit Image

Edits an uploaded image according to a text prompt.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Image-edit model ID.

promptRequiredstringbody

Instructions describing the desired edit.

imageRequiredfilebody

Source image file.

sizeOptionalstringbody

Requested output size when supported.

cURL Request

multipart/form-data
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/images/edits' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --form 'model=gpt-image-2-c' \
  --form 'prompt=Transform the image into a Studio Ghibli-inspired style' \
  --form 'image=@/path/to/image.png' \
  --form 'size=1024x1536'

Response Example

JSON
{
  "created": 1785859200,
  "data": [
    {
      "url": "https://example.com/edited-image.png"
    }
  ]
}
POST/v1beta/models/{model}:{GenerateContentType}

Generate Nano Banana Image

Generates image content using the Gemini-compatible multimodal format.

Parameters

NameTypeLocationDescription
modelRequiredstringpath

Compatible image model ID.

contentsRequiredarraybody

Prompt and optional multimodal input parts.

generationConfigOptionalobjectbody

Output and generation options.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1beta/models/gemini-3.1-flash-image:generateContent' \
  --header 'x-goog-api-key: <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "contents": [
    {
      "parts": [
        { "text": "Create a minimal product photo of a glass teapot." }
      ]
    }
  ]
}'

Response Example

JSON
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "inlineData": {
              "mimeType": "image/png",
              "data": "<BASE64_IMAGE_DATA>"
            }
          }
        ]
      }
    }
  ]
}

Notes

  • The generated image is returned in candidates[].content.parts[].inlineData.
POST/v1/images/generations

Generate Grok Image

Generates Grok images with aspect-ratio, resolution, and response-format controls.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Grok image model ID.

promptRequiredstringbody

Image prompt.

aspect_ratioOptionalstringbody

Requested aspect ratio.

nOptionalintegerbody

Number of images.

resolutionOptionalstringbody

Output resolution.

1k2k

response_formatOptionalstringbody

Image return format.

urlb64_json

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/images/generations' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "grok-imagine-image",
  "prompt": "A quiet futuristic train station at blue hour",
  "aspect_ratio": "16:9",
  "resolution": "2k",
  "response_format": "url"
}'

Response Example

JSON
{
  "created": 1785859200,
  "data": [
    { "url": "https://example.com/grok-image.png" }
  ]
}
POST/v1/images/edits

Edit Grok Image

Edits one or more source images with a Grok-compatible image model.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Grok image-edit model ID.

promptRequiredstringbody

Editing instructions.

image / imagesRequiredfile | arraybody

One source image or multiple source images.

response_formatOptionalstringbody

Image return format.

urlb64_json

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/images/edits' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --form 'model=grok-imagine-image' \
  --form 'prompt=Replace the background with a clean studio setting' \
  --form 'image=@/path/to/source.png'

Response Example

JSON
{
  "created": 1785859200,
  "data": [
    { "url": "https://example.com/grok-edited-image.png" }
  ]
}

Videos

Create asynchronous video tasks and retrieve their status and result.

POST/v1/videos

Create Grok Video

Creates an asynchronous Grok video-generation task.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Video-generation model ID.

promptRequiredstringbody

Description of the requested video.

durationOptionalintegerbody

Requested duration in seconds.

aspect_ratioOptionalstringbody

Requested aspect ratio.

resolutionOptionalstringbody

Output resolution.

480p720p1080p

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/videos' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "grok-imagine-video",
  "prompt": "A serene lake at sunrise with mist rolling over the water",
  "duration": 8,
  "aspect_ratio": "16:9",
  "resolution": "720p"
}'

Response Example

JSON
{
  "id": "task_...",
  "object": "video",
  "status": "queued"
}
GET/v1/videos/{task_id}

Retrieve Grok Video

Retrieves the current status and result of a video task.

Parameters

NameTypeLocationDescription
task_idRequiredstringpath

Public task ID returned by the create request.

cURL Request

application/json
curl --request GET \
  --url 'https://api.juhenextvip.com/v1/videos/task_...' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

Response Example

JSON
{
  "id": "task_...",
  "object": "video",
  "status": "completed",
  "url": "https://example.com/generated-video.mp4"
}

Notes

  • Poll at a reasonable interval and stop when the task reaches a terminal state.

Seedance 2.0

Review reusable media assets and create Seedance 2.0 video tasks.

POST/v1/video/generations

Submit Material Review

Submits one image, audio, or video URL for reusable-asset review.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Review model matching the media type.

seedance-review-imageseedance-review-audioseedance-review-video

promptRequiredstringbody

Short description of the asset.

metadata.contentRequiredarraybody

Exactly one media item using image_url, audio_url, or video_url.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/video/generations' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedance-review-image",
  "prompt": "Review this character reference image",
  "metadata": {
    "content": [
      {
        "type": "image_url",
        "image_url": {
          "url": "https://example.com/reference.png"
        }
      }
    ]
  }
}'

Response Example

JSON
{
  "id": "task_...",
  "status": "queued",
  "model": "seedance-review-image"
}

Notes

  • The media URL must be an absolute HTTPS URL, and metadata.content must contain exactly one item.
  • After approval, save the persistent asset://asset-... identifier instead of a temporary signed URL.
GET/v1/video/generations/{task_id}

Retrieve Material Review

Retrieves a material-review result and its reusable asset identifier.

Parameters

NameTypeLocationDescription
task_idRequiredstringpath

Public review task ID.

cURL Request

application/json
curl --request GET \
  --url 'https://api.juhenextvip.com/v1/video/generations/task_...' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

Response Example

JSON
{
  "id": "task_...",
  "status": "completed",
  "asset": "asset://asset-..."
}
POST/v1/video/generations

Create Seedance Video

Creates a Seedance 2.0 asynchronous video-generation task.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Seedance video model ID.

seedance-2-0seedance-2-0-fastseedance-2-0-mini

promptRequiredstringbody

Video prompt.

secondsRequiredstringbody

Duration as a JSON string from 4 to 15.

imagesOptionalarraybody

Optional image references.

metadata.resolutionOptionalstringbody

Output resolution; fast and mini support 480p and 720p.

480p720p1080p

metadata.ratioOptionalstringbody

Output aspect ratio.

1:116:99:164:33:43:22:3

metadata.contentOptionalarraybody

Reviewed asset references used by the task.

metadata.callback_urlOptionalstringbody

HTTPS callback URL for status updates.

metadata.generate_audioOptionalbooleanbody

Whether to generate audio when supported.

metadata.service_tierOptionalstringbody

Task service tier.

defaultflex

metadata.return_last_frameOptionalbooleanbody

Returns the last frame when supported.

metadata.seedOptionalintegerbody

Generation seed; use -1 for a random seed.

metadata.watermarkOptionalbooleanbody

Whether to add a watermark.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/video/generations' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "seedance-2-0",
  "prompt": "Morning clouds drift slowly across snow-covered mountains as the camera moves forward smoothly",
  "seconds": "5",
  "metadata": {
    "resolution": "720p",
    "ratio": "16:9",
    "generate_audio": true,
    "seed": -1,
    "watermark": false
  }
}'

Response Example

JSON
{
  "id": "task_...",
  "status": "queued",
  "model": "seedance-2-0"
}

Notes

  • Additional metadata fields may be model-specific. Start with the minimum required fields and add controls only when needed.
GET/v1/video/generations/{task_id}

Retrieve Seedance Video

Retrieves a Seedance task status and the generated video result.

Parameters

NameTypeLocationDescription
task_idRequiredstringpath

Public task_... ID returned by JuheNext.

cURL Request

application/json
curl --request GET \
  --url 'https://api.juhenextvip.com/v1/video/generations/task_...' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

Response Example

JSON
{
  "id": "task_...",
  "status": "completed",
  "video_url": "https://example.com/seedance-video.mp4"
}

Notes

  • Always query with the public task_... ID returned by JuheNext, not an upstream internal ID.

Models & Usage

Create embeddings, list available models, and inspect API Key allowance.

POST/v1/embeddings

Create Embedding

Creates a vector representation of text input.

Parameters

NameTypeLocationDescription
modelRequiredstringbody

Embedding model ID.

inputRequiredstring | arraybody

Text or array of text to embed.

encoding_formatOptionalstringbody

Vector encoding format.

floatbase64

dimensionsOptionalintegerbody

Requested vector dimensions when supported.

cURL Request

application/json
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/embeddings' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "text-embedding-3-small",
  "input": "JuheNext makes model APIs easier to use.",
  "encoding_format": "float"
}'

Response Example

JSON
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [0.0123, -0.0456, 0.0789]
    }
  ],
  "model": "text-embedding-3-small"
}
GET/v1/models

List Models

Lists model IDs currently available to the supplied API Key.

cURL Request

application/json
curl --request GET \
  --url 'https://api.juhenextvip.com/v1/models' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

Response Example

JSON
{
  "object": "list",
  "data": [
    {
      "id": "gpt-5.6-luna",
      "object": "model",
      "owned_by": "provider"
    }
  ]
}

Notes

  • Availability may vary by API Key and can change. Use this endpoint or the Models page as the live reference.
GET/api/usage/token

Retrieve Key Usage

Retrieves allowance and usage totals for the supplied API Key.

cURL Request

application/json
curl --request GET \
  --url 'https://api.juhenextvip.com/api/usage/token' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'

Response Example

JSON
{
  "data": {
    "name": "JuheNext Key",
    "expires_at": -1,
    "total_granted": 5000000,
    "total_used": 1250000,
    "total_available": 3750000,
    "unlimited_quota": false
  }
}

Notes

  • The public Usage page can also display balance and up to 1,000 recent logs.
  • Field presence and numeric units follow the live API response.