# everyais API and public data reference ## Answer first everyais is an OpenAI-compatible AI API gateway: one API key and base URL provide access to the callable models in its public catalog, with usage controls and transparent reference prices. Updated: 2026-10-19T10:08:38.450Z ## Definitions - Reference price: the public catalog price, including model discounts, used for comparison; account and organization rates can change the final billed price. ## Model catalog Browse the callable models and their reference prices on the public pages below. - English: https://platform.everyais.com/en/models - 한국어: https://platform.everyais.com/models - `everyais/gemini-4-argon` - `everyais/claude-haiku-5-5` - `everyais/gemini-nano-banana-2-1` - `everyais/gpt-6-1-sol` - `everyais/grok-4-7` - `everyais/claude-sonnet-5-5` - `everyais/gpt-6-luna` - `everyais/gpt-6-sol` - `everyais/claude-opus-5-5` - `everyais/gpt-6-astra` - `everyais/gpt-image-2-5-sunburst` - `everyais/gpt-image-2-5-flare` - `everyais/gemini-3-8-flash` - `everyais/claude-fable-5-1` - `everyais/kimi-k3` - `everyais/gemini-omni-1-1-flash` - `everyais/nemotron-3-5-lightning` - `everyais/gemini-omni-flash-preview` - `everyais/gemini-3-1-flash-lite-image` - `everyais/claude-fable-5` - `everyais/minimax-m3` - `everyais/gemini-3-1-flash-image` - `everyais/deepseek-v4-pro-0813` - `everyais/deepseek-v4-flash-0731` - `everyais/gemini-3-1-pro-preview` - `everyais/glm-5-3` - `everyais/glm-5-3-flash` - `everyais/gemini-3-pro-image` - `everyais/veo-3-1-fast-generate-001` - `everyais/veo-3-1-generate-001` - `everyais/gemini-2-5-flash-image` - `everyais/qwen-3.8-27b` - `everyais/deepseek-v4-1-flash-1017` - `everyais/muse-spark-open` - `everyais/nemotron-3-5-super-vl` - `everyais/flux-3-image-klein` - `everyais/minimax-h3-turbo` ## API docs - Base URL: https://api.everyais.com/v1 - Authentication: `Authorization: Bearer everyais_...` - OpenAPI: https://api.everyais.com/openapi.json - English: https://platform.everyais.com/en/docs - 한국어: https://platform.everyais.com/docs # Getting started ## Quickstart _Send your first request with curl, Python, or Node.js._ Source: https://platform.everyais.com/en/docs/quickstart Updated: 2026-10-13T08:20:31.119Z ## 1. Prepare an API key [Create a key in the dashboard](https://platform.everyais.com/dashboard/keys) and [add credits](https://platform.everyais.com/dashboard/pricing). The plaintext key is shown only once. Set it as an environment variable in your terminal. ```bash export EVERYAIS_API_KEY="everyais_your_api_key" ``` ## 2. Choose a model ```bash export EVERYAIS_MODEL="everyais/gemini-3-5-flash-lite" ``` To use another model, copy its ID from the [model directory](https://platform.everyais.com/en/models) and replace the value. Use `GET /v1/models` to list models your key can call, and see [model selection](https://platform.everyais.com/en/docs/model-selection) for capabilities and access policies. If your key restricts scopes, it needs `models:read` for listing and `chat` for generation. ## 3. Send your first request ### curl ```bash curl https://api.everyais.com/v1/chat/completions \ -H "Authorization: Bearer $EVERYAIS_API_KEY" \ -H "Content-Type: application/json" \ -d @- <`. ```json { "model": "everyais/flux-3-image-klein", "prompt": "A cozy cafe window scene: a sleeps on the left windowsill and a stands on the right. [{\"id\":\"cat\",\"bbox\":[500,50,900,450],\"desc\":\"orange tabby cat curled up\"},{\"id\":\"plant\",\"bbox\":[300,600,900,900],\"desc\":\"potted monstera\"}]", "aspect_ratio": "3:2", "resolution": "1K", "extra_body": { "gpunode": { "seed": 42 } } } ``` ### Tips - Full scene captions beat short prompts. - There are no negative prompts — describe what should be there. - Put text to render in quotes. - Latency depends on size, reference count and the upsampler. Measured 2026-10-16 (GPU time, excluding queue and transfer): with the upsampler on, 768 ≈ 5 s, 1K 6–8 s, 1.5K ≈ 9 s, 2K ≈ 16 s, 2–3 reference edits 12–15 s, 10 reference edits ≈ 55 s. With it off, 1K ≈ 2 s. One node renders one image at a time, so bursts add queue time (no fixed SLA). - License: FLUX Kommunity License (non-commercial, plus commercial use of outputs for qualifying users). Outputs pass a content (NSFW) filter and are AI-generated. ## Model options Check the table above for the values the selected model supports (in the API: `capabilities`, `limits`, and `parameter_constraints` in `GET /v1/models`). Whether an unsupported value is adjusted or rejected with **400** is described under parameter policy in [model selection and access](https://platform.everyais.com/en/docs/model-selection#doc-parameter-policy). Omitting size, aspect ratio, resolution, or quality applies the `defaults` in `parameter_profile`. For quality, check `limits.supported_qualities`. ## Request ```json { "model": "", "prompt": "a beautiful sunset over mountains", "aspect_ratio": "16:9", "resolution": "2K" } ``` ## Response ```json { "created": 1709884800, "data": [ { "url": "https://..." } ] } ``` `url` is a presigned URL valid for 10 minutes. To keep an image longer, download and store it yourself. Once it expires you can re-issue one through `GET /v1/outputs/{requestId}` for up to 24 hours. The `requestId` is the value of this response's `x-request-id` header (`x-everyais-operation-id` carries the same value). It is not in the response body, so store the header. --- ## POST /v1/images/edits _Image editing (inpainting and outpainting). Supports both multipart and JSON (base64)._ Source: https://platform.everyais.com/en/docs/images-edits Updated: 2026-10-18T15:55:02.057Z ## Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `model` | string | Yes | ID of a model that supports editing | | `prompt` | string | Yes | 1–16,000 characters. A provider with a lower limit may reject longer prompts | | `image` | string \| file \| array | Yes | Source image — a base64 string in JSON, a file part in multipart. FLUX 3 Image Klein accepts an array of 1–10 reference images | | `mask` | string \| file | No | Mask for the region to edit. Check `capabilities.image_mask` | | `n` | integer | No | Number of images to generate, **1–4** (default 1) | | `size` | string | No | Pixel `WxH` or `auto` (e.g. `256x256` · `512x512` · `1024x1024` · `1792x1024` · `1024x1792` · `1536x1024` · `1024x1536` · `auto`) or a resolution tier. Same rules as generation; omission keeps the provider default (usually the input image's ratio) | | `aspect_ratio` | string | No | `1:1` · `16:9` · `9:16` · `4:3` · `3:4` · `3:2` · `2:3` · `4:5` · `5:4` · `1:2` · `2:1` · `7:5` · `5:7` · `1:4` · `4:1` · `1:8` · `8:1` · `9:21` · `21:9` · `auto`. Changes the output ratio only when given | | `resolution` | string | No | `512` · `768` · `1K` · `1.5K` · `2K` · `4K` | | `response_format` | string | No | `url` (default) · `b64_json` | | `quality` / `output_format` / `output_compression` / `background` | | No | Same meaning as generation (`/v1/images/generations`); supported models only | | `extra_body.google` | object | No | **deprecated** — `aspect_ratio` and `image_size` alias `aspect_ratio` and `resolution`. A JSON string in multipart | | `extra_body.gpunode` | object | No | Managed GPU node models only: `seed` · `num_inference_steps` · `prompt_upsampling` (FLUX 3 Image Klein). A JSON string in multipart | | `prompt_upsampling` | boolean | No | FLUX 3 Image Klein only, same as generation. `true`/`false` in multipart | | `user` | string | No | End-user identifier | The entire multipart body is limited to **4 MiB**; JSON is limited to **5 MiB**. After file-to-base64 conversion, the payload must also fit within 5 MiB. Exceeding these limits returns 413 `request_too_large` or `invalid_request_error`. Check encoded byte size, not only image dimensions. ## Model options Check the table above for the values the selected model supports (in the API: `capabilities`, `limits`, and `parameter_constraints` in `GET /v1/models`). Whether an unsupported value is adjusted or rejected with **400** is described under parameter policy in [model selection and access](https://platform.everyais.com/en/docs/model-selection#doc-parameter-policy). Use a mask only with `capabilities.image_mask: true`. Supported aspect ratios, resolutions, and adjustment rules match [image generation](https://platform.everyais.com/en/docs/images-generations#doc-aspect-ratio-and-resolution). When size, aspect ratio, and resolution are all omitted, the edit keeps the provider default (usually the input image's ratio). ## Request (JSON) ```json { "model": "", "prompt": "change the sky to sunset", "image": "", "n": 1 } ``` ## Response ```json { "created": 1709884800, "data": [ { "url": "https://..." } ] } ``` ## FLUX 3 Image Klein editing (`everyais/flux-3-image-klein`) - `image` is one image or an **array of 1–10 reference images**. In JSON use base64/data URLs; in multipart repeat `image` or `image[]` parts. JPEG, PNG, WebP. Body limits are unchanged (4 MiB multipart / 5 MiB JSON), so compress references before sending. - `n`, `output_format`, `prompt_upsampling`, and `extra_body.gpunode` (`seed`, `num_inference_steps`) match generation (in multipart, `prompt_upsampling` is `true`/`false` and `extra_body` is a JSON string). Pricing also matches generation, by output tier (`768` $0.008 · `1K` $0.009 · `1.5K` $0.011 · `2K` $0.014, times `n`). - Omitting `size`: the output follows the first reference. With one reference, same aspect ratio fitted to ≤4 MP and ≤4096 px per side; with several, the first reference is scaled under 1 MP on multiples of 16. Billing uses the nearest tier. If given, `size` must be one of the 60 sizes in [image generation](https://platform.everyais.com/en/docs/images-generations#doc-flux-3-image-klein). - Refer to references in the prompt by position ("the first image", `` in box edits). This model has no mask. - Describe the edit as the full target image. For box edits, append a JSON list to the prompt: `{"id","from":"ref_image_0"|null,"src_bbox","tgt_bbox","desc"}` (0–1000 grid; `tgt_bbox: null` removes). Boxes guide placement and scale; they are not hard masks. ```json { "model": "everyais/flux-3-image-klein", "prompt": "Move the from the first image to the right side of the table. [{\"id\":\"mug\",\"from\":\"ref_image_0\",\"src_bbox\":[600,100,800,250],\"tgt_bbox\":[600,650,800,800],\"desc\":\"white ceramic mug\"}]", "image": [""], "n": 1 } ``` --- ## POST /v1/videos/generations _Video generation (billed per second). Submit, then fetch the result from the dedicated polling endpoint._ Source: https://platform.everyais.com/en/docs/videos-generations Updated: 2026-10-18T15:55:06.267Z ## Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `model` | string | Yes | A VIDEO category model ID (e.g. `everyais/veo-3-1-generate-001`) | | `prompt` | string | Yes | 1–4000 characters | | `duration` | integer | No | Shared input range: 1–120 seconds. Supported lengths and omission defaults depend on the model (see below; Gemini Omni 1.1 takes 3–10) | | `image` | string | No | First frame (image-to-video). JPEG/PNG/WebP data URL or base64; request body up to 5 MiB (Veo: JPEG/PNG only). Only models listing `image` in `parameter_constraints` accept it (Veo, Omni, managed GPU node models); others return **400** | | `last_image` | string | No | Last frame, same format as `image`; both images together must fit the 5 MiB request body. With `image` it conditions first→last frames; alone it fixes only the last frame (Veo and Omni require `image`). Only models listing `last_image` in `parameter_constraints` accept it | | `pricingVariant` | string | No | Resolution/audio variant key. Use the `pricing.variants[].key` value from `GET /v1/models` verbatim | | `user` | string | No | End-user identifier | | `extra_body.google` | object | No | `aspectRatio` (`16:9`/`9:16`, Veo and Omni) · Veo-only `negativePrompt` (≤4000 characters) · `seed` · `enhancePrompt` | | `extra_body.gpunode` | object | No | Managed GPU node video models only: `size` (`WxH`, one of the model's published sizes) · `seed` · `num_inference_steps` | ## Model options Check the table above for the values the selected model supports (in the API: `capabilities`, `limits`, and `parameter_constraints` in `GET /v1/models`). Whether an unsupported value is adjusted or rejected with **400** is described under parameter policy in [model selection and access](https://platform.everyais.com/en/docs/model-selection#doc-parameter-policy). Check `limits.supported_durations` and `pricing.variants`. Omit them to use model defaults. Duration and resolution must form a supported combination. ## Request ```json { "model": "everyais/veo-3-1-generate-001", "prompt": "a timelapse of a blooming flower", "duration": 8, "pricingVariant": "1080p-with-audio" } ``` ## Response (submitted) ```json { "id": "cm...", "object": "video.generation.job", "created": 1709884800, "model": "everyais/veo-3-1-generate-001", "status": "processing" } ``` --- ## GET /v1/videos/generations/{id} Poll job status and results. **Put the `id` from the POST response in this path.** > ⚠️ You cannot look the job up through `/v1/outputs/{requestId}`. Video job ids and request ids live in > separate spaces, so polling there always returns 404. While a job is in progress the response carries a `Retry-After: 5` header — poll at 5-second intervals. There are four `status` values. | status | Meaning | |--------|---------| | `processing` | Submission, provider processing, or settlement in progress | | `completed` | Done — includes `durationSeconds` and `data` | | `failed` | Failed or timed out — includes `error` | | `cancelled` | Cancelled | ```json { "id": "cm...", "object": "video.generation.job", "created": 1709884800, "model": "everyais/veo-3-1-generate-001", "status": "completed", "durationSeconds": 8, "data": [{ "url": "https://..." }] } ``` In rare cases where the outcome of the provider call could not be confirmed, `processing` comes back together with `outcome_unknown: true`, plus `requires_manual_review: true` when an operator needs to check it. If the job does not exist, has expired (24 hours), or belongs to a different API key, you get a 404 `job_not_found`. ## Billing `total cost = durationSeconds × per-second price`. If you specify `pricingVariant`, that variant's unit price takes precedence. For example, `everyais/veo-3-1-generate-001` offers the `720p-with-audio` · `1080p-with-audio` · `4k-with-audio` variants. Check the exact keys and unit prices in the `pricing` field of the `GET /v1/models` response. --- ## GET /v1/models _List models and retrieve a single model. Slugs containing slashes are supported._ Source: https://platform.everyais.com/en/docs/models Updated: 2026-10-18T17:35:54.106Z ## Request ```http GET /v1/models ``` ## Response ```json { "object": "list", "data": [ { "id": "everyais/claude-sonnet-5-5", "aliases": ["claude-sonnet-5-5"], "object": "model", "owned_by": "everyais", "created": 1782008704, "registered_at": "2026-06-21", "released_at": "2026-06-21", "updated_at": "2026-08-27T04:30:00.000Z", "name": "Claude Sonnet 5.5", "description": "(model summary, currently Korean only)", "series": "claude", "input_modalities": ["text", "image"], "output_modalities": ["text"], "knowledge_cutoff": null, "price_search_per_query": null, "supply": "first_party", "training_use": "never", "category": "LLM", "type": "chat", "supported_endpoints": ["/v1/chat/completions", "/v1/messages", "/v1/responses"], "capabilities": { "streaming": true, "tool_use": true, "vision": true, "json_mode": true, "structured_outputs": true, "sampling": false, "parallel_tool_calls": true, "reasoning": true, "web_search": false }, "limits": { "context_window": 1000000, "reasoning_efforts": ["low", "medium", "high", "xhigh", "max", "none"] }, "parameter_profile": { "version": 1, "scope": "all-active-routes", "tasks": { "chat": { "status": "supported", "required": ["model", "messages"], "defaults": {}, "parameters": { "reasoning_effort": { "status": "supported", "type": "string", "allowed_values": ["low", "medium", "high", "xhigh", "max", "none"] } }, "combinations": [] } } }, "parameter_constraints": [{ "provider": "aws-bedrock", "parameters": { "chat": { "reasoning_effort": { "supported": true, "type": "string", "allowed_values": ["low", "medium", "high", "xhigh", "max", "none"] } } } }], "pricing": { "unit": "per_1m_tokens", "is_free": false, "input_per_1m": 3.159, "output_per_1m": 15.795, "list": { "input_per_1m": 3.51, "output_per_1m": 17.55 }, "discount_percent": 10 }, "discount_percent": 10, "available": true } ] } ``` ## Model fields | Field | Description | |-------|-------------| | `id` · `aliases` | Model ID and accepted aliases | | `name` · `description` · `series` | Display name, description, family | | `category` | `LLM` · `IMAGE` · `VIDEO` | | `supported_endpoints` | API paths | | `available` | Current availability | | `input_modalities` · `output_modalities` | Input and output formats | | `created` · `registered_at` · `released_at` | Compatibility epoch, registration date, release date | | `knowledge_cutoff` | Verified knowledge cutoff; null if unknown | | `capabilities` | `true`: supported; `false`: unsupported; omitted: unverified | | `limits` | Supported values and limits | | `parameter_profile.tasks` | Required inputs, defaults, supported ranges, and combinations per operation | `capabilities` distinguishes `sampling`, `json_mode`, `structured_outputs`, `json_mode_with_tools`, `web_search_with_tools`, `parallel_tool_calls`, and `image_mask`. `limits` includes `reasoning_efforts`, `supported_sizes`, `supported_qualities`, `supported_durations`, and `max_images`. An empty array means no supported values. Unsupported values or combinations return **400** `unsupported_parameter`; check `error.param` for the field. See parameter policy in [model selection and access](https://platform.everyais.com/en/docs/model-selection#doc-parameter-policy) for how values are adjusted. ## Pricing and access | Field | Description | |-------|-------------| | `pricing` | Display rates. Actual costs apply account rates; check cost headers and usage | | `pricing.is_free === true` | Free input, output, and cache tokens. Web search is billed separately | | `pricing.list` · `pricing.discount_percent` | Prices before discounts and the minimum discount shared by all rates. Includes list-price discounts and all-customer promotions | | `discount_percent` | The everyais promotional part of that discount (already reflected in the `pricing` rates). The maximum when the discount differs by provider route | | `pricing.variants` | Variant `key` and `price` | | `pricing.long_context` | Rates when input exceeds `threshold_tokens`. `base_input_per_1m` and `base_output_per_1m` are aliases for long-context rates | | `price_search_per_query` | Base rate per search billing unit. Check `capabilities.web_search` for support | | `pricing.conditions` | Required `community_supply` or `training_use` consent for shown rates | | `supply` · `training_use` | Community supply and training-use conditions. Off by default; organization keys use organization settings | Models requiring consent are excluded according to account settings. ## GET /v1/models/{model} Append the full model ID, including its slashes. ```http GET /v1/models/everyais/gemini-3-5-flash-lite ``` Missing or inaccessible models return 404 `model_not_found`. --- ## GET /v1/outputs/{requestId} _Retrieve a stored request and refresh its output URLs, valid for 10 minutes._ Source: https://platform.everyais.com/en/docs/output-retrieval Updated: 2026-10-13T08:22:29.628Z Completed requests remain available for **24 hours**. Authenticate with an API key or user session; only requests accessible to that principal are returned. ## Find the requestId The `requestId` is the value of the `x-request-id` header on an image generation or edit response; `x-everyais-operation-id` carries the same value. An `x-request-id` you send yourself is only a trace hint and does not become the stored id. The response body does not include it, so store the response header if you plan to retrieve the result again. ```http HTTP/1.1 200 OK content-type: application/json x-request-id: V1StGXR8_Z5jdHi6B-myT x-everyais-operation-id: V1StGXR8_Z5jdHi6B-myT ``` ## Retrieve the result ```http GET /v1/outputs/V1StGXR8_Z5jdHi6B-myT ``` Returns the details of a single request and the URLs of its result files. `id` is the `requestId` you requested, and `urls` are presigned URLs valid for 10 minutes. ```json { "id": "V1StGXR8_Z5jdHi6B-myT", "model": "everyais/gemini-3-1-flash-image", "endpoint": "/v1/images/generations", "status": "COMPLETED", "inputTokens": 0, "outputTokens": 0, "imageCount": 1, "totalCost": 0.04, "latencyMs": 1200, "urls": ["https://..."], "createdAt": "2026-07-30T01:23:45.000Z" } ``` Outputs outside your API key's scope return 403 `insufficient_scope`. > ⚠️ Do not use this endpoint to poll video jobs. > Poll videos with `GET /v1/videos/generations/{id}` (the id space is different). --- # Guides ## Streaming _Incremental tokens, SSE completion and errors, and final usage._ Source: https://platform.everyais.com/en/docs/streaming Updated: 2026-09-08T10:12:19.139Z ## Chat streaming Set up the environment variables from the [quickstart](https://platform.everyais.com/en/docs/quickstart) and enable `stream: true`. Use `stream_options.include_usage: true` to receive the final usage chunk. ```python import os from openai import OpenAI client = OpenAI( api_key=os.environ["EVERYAIS_API_KEY"], base_url="https://api.everyais.com/v1", timeout=240.0, ) stream = client.chat.completions.create( model=os.environ["EVERYAIS_MODEL"], messages=[{"role": "user", "content": "Hello!"}], stream=True, stream_options={"include_usage": True}, ) try: for chunk in stream: if chunk.choices: print(chunk.choices[0].delta.content or "", end="", flush=True) if chunk.usage: print("\nUsage:", chunk.usage.total_tokens) finally: stream.close() ``` ## Reading SSE events - Chat sends `data: {...}` frames and ends with `data: [DONE]`. - The final usage chunk can have `choices: []`. Do not access `choices[0]` without checking. - Comments such as `: ok` are connection heartbeats, not JSON. - Network chunks are not SSE event boundaries. Custom consumers must buffer through a blank line and decode UTF-8 incrementally. ## Messages and Responses | API | Completion and usage | |-----|----------------------| | `/v1/messages` | Anthropic events including `message_start`, `content_block_delta`, `message_delta`, and `message_stop` | | `/v1/responses` | Responses events including `response.output_text.delta` and `response.completed` | Use the corresponding SDK's stream consumer. Do not apply Chat's `[DONE]` handling to every format. Responses with `background: true` return a job JSON object instead of a stream. ## Errors and disconnections After HTTP 200 starts a stream, provider errors can still arrive inside events. Treat error events, exceptions, or disconnection without a terminal event as failures. Close the stream when cancelling and check generated output and billing before retrying. `Idempotency-Key` cannot replay a completed SSE response. Web-search citations arrive near the end. See [web search](https://platform.everyais.com/en/docs/web-search) for final usage and citation handling. --- ## Prompt caching _Cache the repeated prefix to cut input cost — check the cost conditions before you turn it on._ Source: https://platform.everyais.com/en/docs/prompt-caching Updated: 2026-10-13T08:22:51.433Z Cache the **prefix that repeats on every request** — system prompts, tool definitions, prior turns — to reduce input cost. Set the `everyais` option on the request (with the OpenAI SDK, pass it through `extra_body`). ```json { "model": "everyais/claude-sonnet-5-5", "messages": [], "everyais": { "cache": "on", "cache_ttl": "5m" } } ``` | Option | Behavior | |------|------| | `cache: "on"` | Attaches cache points automatically, in the order tool definitions → system → last user turn (up to 4) | | `cache: "off"` | Removes both the automatic attachments and any `cache_control` the client sent itself | | `cache_ttl: "5m" \| "1h"` | Cache lifetime. Default `5m`; `1h` has a higher write cost | | Anthropic `/v1/messages` | `cache_control` breakpoints attached to blocks are passed through as-is | | Gemini family | Implicit caching, so it hits with no extra configuration and there is no cache-write billing | Cache read/write tokens are billed as separate line items at the provider's unit prices, and you can confirm whether a hit actually occurred from `usage.prompt_tokens_details.cached_tokens` in the response. ## ⚠️ Check this before you turn it on — a cache write costs more than input A cache hit (read) is billed at roughly 10% of the input unit price, but **a cache write costs more than the input unit price** (about 1.25x for 5m, about 2x for 1h). So if the prefix changes on every request, you incur the write cost over and over and it **ends up more expensive than leaving caching off**. Turn it on only for multi-turn requests that continue a conversation with a fixed prefix; do not turn it on for one-off short requests. --- ## Async jobs _Responses background jobs and video generation polling in one flow._ Source: https://platform.everyais.com/en/docs/async-jobs Updated: 2026-10-13T08:22:55.628Z Long-running work uses the **async job** model: you submit the request and collect the result later. The gateway has two kinds, and their polling paths differ. ## 1. Responses background jobs Pass `background: true` to `POST /v1/responses` and it responds immediately with `status: "queued"`. ```json { "model": "everyais/gemini-3-5-flash-lite", "input": "A long research task...", "background": true } ``` - Polling: `GET /v1/responses/{id}` - State transitions: `queued` → `in_progress` → `completed` / `incomplete` / `failed` / `cancelled` - Cancel: `POST /v1/responses/{id}/cancel` (only `queued` and `in_progress` can be cancelled, and the reserved credit is refunded) ## 2. Video generation jobs `POST /v1/videos/generations` is always async. Poll with the `id` from the response. - Polling: `GET /v1/videos/generations/{id}` - While in progress you get `Retry-After: 5` — poll at 5-second intervals. - Status: `processing` / `completed` / `failed` / `cancelled` > ⚠️ Looking up a video job via `GET /v1/outputs/{requestId}` returns 404. > Video job ids and completed request ids live in different spaces. --- ## Web search _The model runs web searches — Google bills per search query; Z.AI bills per search-enabled request._ Source: https://platform.everyais.com/en/docs/web-search Updated: 2026-10-13T08:22:59.824Z When the model decides it needs to, it **runs a web search itself** and answers from the results. Your client does not have to execute any tool — just add a single `web_search` entry to `tools`. ```json { "model": "everyais/gemini-3-5-flash-lite", "messages": [{"role": "user", "content": "What's the weather in Seoul today?"}], "tools": [{"type": "web_search"}] } ``` ```python resp = client.chat.completions.create( model="everyais/gemini-3-5-flash-lite", messages=[{"role": "user", "content": "What's the weather in Seoul today?"}], tools=[{"type": "web_search"}], ) ``` ## Supported models **Check `capabilities.web_search` in `GET /v1/models` — that list is the only source of truth.** Support varies by model within both Gemini and GLM families. Check the current catalog. Check this field for the example model too, and replace the ID if the supported models change. ```bash curl https://api.everyais.com/v1/models \ -H "Authorization: Bearer $EVERYAIS_API_KEY" \ | jq '.data[] | select(.capabilities.web_search) | .id' ``` If you send `web_search` to a model that does not support it, you get 400 `web_search_unsupported_model` before the provider is called (no billing). - You can put **at most 1** `web_search` entry in the `tools` array (2 or more returns 400). - You can use it alongside function tools. `tool_choice: "none"` disables both functions and search. Requiring a tool or naming a function when only search is present returns 400. - It is `/v1/chat/completions` only — `/v1/messages` and `/v1/responses` do not support it yet. ## Search billing **Gemini models** bills per **executed search query**. Two queries within one request are billed as two searches. If the model does not search, search billing is zero. **GLM models** bills **one search for each successful request with web search enabled**, even when there are no results or the model does not search: `billed_queries = 1`. This search charge also applies to models whose tokens are free. - Search cost = `billed_queries × search price`, and it is **summed separately from** token billing. - `pricing.is_free` covers only input, output, and cache tokens; it does not waive search charges. - Content fetched by Google search is not billed as input tokens. - Check the number of queries actually billed in `x_everyais.web_search.billed_queries` in the response. On non-streaming responses, the `x-everyais-cost-usd` header carries the total including search cost. There is no parameter that forcibly caps the query count (the provider does not offer one). To control spend, use the monthly/daily spend limit on the API key. ## Reading citations from the response ```json { "choices": [{ "index": 0, "message": { "role": "assistant", "content": "Seoul is clear today with a high of 28 degrees.", "annotations": [ { "type": "url_citation", "url_citation": { "url": "https://...", "title": "Seoul weather", "start_index": 0, "end_index": 47 } } ] }, "finish_reason": "stop" }], "x_everyais": { "web_search": { "queries": ["Seoul weather today"], "search_entry_point_html": "
...
", "billed_queries": 1 } } } ``` | Field | Description | |------|------| | `message.annotations[]` | OpenAI `url_citation`-compatible citations. `start_index`/`end_index` are **character indexes** into `content`, so slicing with them directly gives you the cited span | | `x_everyais.web_search.queries` | The search terms the model actually ran | | `x_everyais.web_search.billed_queries` | Search billing units: executed queries for Google; 1 per successful search-enabled Z.AI request | | `x_everyais.web_search.search_entry_point_html` | Search suggestion HTML provided by Google | > ⚠️ `search_entry_point_html` is HTML that Google **requires you to display**. If your service shows > search results on screen, render it as-is. It is untrusted external HTML, so isolate it — > for example with `