New users get free credits — no credit card requiredGet started

API Reference

Endpoint reference

Use these endpoints to build against the APIAny gateway. Core routes follow OpenAI-compatible conventions, while compatibility routes preserve old clients from the previous API platform.

Authentication

Protected endpoints accept Authorization: Bearer sk-your-api-key. During migration, x-api-key is also accepted, and Gemini-compatible routes accept x-goog-api-key.

Authenticated request
curl https://devnextapiany.mexxxxai.win/api/v1/models \
  -H "Authorization: Bearer sk-your-api-key"

Endpoints

GET/api/v1/modelsList active public models with type, capability, pricing, and parameters.
POST/api/v1/chat/completionsSend OpenAI-compatible chat completion requests.
POST/api/v1/images/uploadUpload JPEG, PNG, or WebP inputs with API key authentication.
POST/api/v1/images/generateCreate an async image generation task.
POST/api/v1/video/generateCreate an async video generation task.
GET/api/v1/tasks/{task_id}Poll an async media task by task id.
POST/api/v1/api/generateAccepts legacy media fields such as images, aspectRatio, imageSize, and video model aliases.
GET/api/v1/api/result?id={task_id}Legacy task result alias for clients using id as the query parameter.
GET/api/v1/video/status?task_id={task_id}Legacy video status response with success/data wrapper.
GET/api/v1/internal/workflow-status?uuid={task_id}Legacy workflow status alias for clients polling image task uuid values.
POST/api/v1beta/models/{model}:generateContentAccepts Gemini contents and generationConfig, then routes through the platform pipeline.
POST/api/internal/jobs/process-pending-callbacksInternal scheduler endpoint that retries pending async task callbacks.
POST/api/internal/jobs/check-stale-media-tasksInternal scheduler endpoint that marks stale processing media tasks failed and refunds reserved credits.
POST/api/internal/jobs/check-api-channelsInternal scheduler endpoint that checks upstream channel health and updates routing status.
POST/api/internal/jobs/scheduled-maintenanceInternal scheduler endpoint that rebuilds monthly summaries and deletes expired API detail rows.
GET/api/internal/jobs/scheduled-maintenanceReturns recent scheduled-maintenance and retention cleanup runs.

Examples

Chat completion
curl https://devnextapiany.mexxxxai.win/api/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      { "role": "user", "content": "Write a concise release note." }
    ],
    "max_tokens": 180
  }'
Media compatibility
curl https://devnextapiany.mexxxxai.win/api/v1/api/generate \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "videoai-3.1-fast",
    "type": "video",
    "prompt": "A product API network map, clean and cinematic",
    "aspectRatio": "16:9"
  }'
Gemini compatibility
curl https://devnextapiany.mexxxxai.win/api/v1beta/models/gpt-5.5:generateContent \
  -H "x-goog-api-key: sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      { "role": "user", "parts": [{ "text": "Explain API credit budgets." }] }
    ],
    "generationConfig": {
      "maxOutputTokens": 180
    }
  }'

Compatibility notes

  • API keys are hashed at rest and can be scoped by project, model allowlist, RPM, and credit budget.
  • Channels are selected by model channel groups, priority, and weight. Failed upstream attempts are recorded and retried on the next eligible channel for transient errors.
  • Run the channel health job from a scheduler to keep failover decisions fresh.
  • Run scheduled-maintenance daily to keep monthly revenue and cost rollups available and delete expired API detail rows after the retention window.
  • Media endpoints return task_id immediately; process pending media tasks from your scheduler and poll the task endpoint for completion.
  • Async media requests may include callback_url. It must be a public HTTPS URL; delivery failures are retried and do not change the task status.
  • Gemini-compatible streamGenerateContent requests are normalized through the non-streaming pipeline until streaming settlement is added.