Endpoints
Content Studio
Generate draft content — GBP posts, blogs, landing pages, FAQs, social posts, and review responses — for the active business.
GET
GET /api/v1/content returns recent generated content history for the caller’s active business.
POST /api/v1/content generates a new draft or refines an existing draft for the caller’s active business.
Use an API key with the content:read scope for history reads. Use an API key with the content:write scope for generation and refinement.
This endpoint is available on Growth plans and higher.
Your API key from Settings > API Keys
Filter by content type:
landing_page, faq, gbp_post, social_post, review_response_template, or blog_outlineNumber of results to return (max 100)
Query parameters
| Name | Type | Default | Notes |
|---|---|---|---|
limit | integer | 20 | Maximum 100. |
type | enum | none | Optional filter: landing_page, faq, gbp_post, social_post, review_response_template, or blog_outline. |
presetCategory | enum | none | Optional filter: local_business, product_demo, ecommerce, or professional_services. |
Response
Create or refine content
Request body
| Name | Type | Required | Notes |
|---|---|---|---|
type | enum | no | Defaults from presetCategory when omitted. Values: landing_page, faq, gbp_post, social_post, review_response_template, blog_outline. |
presetCategory | enum | no | Defaults to local_business. Values: local_business, product_demo, ecommerce, professional_services. |
topic | string | no | Optional custom prompt or subject, up to 180 characters. |
tone | enum | no | professional, friendly, casual, persuasive, or informative. |
length | enum | no | short, medium, or long. |
platform | enum | no | Optional social platform hint: facebook, instagram, or linkedin. |
sourceUrl | string | no | Optional public HTTP/HTTPS URL from the caller’s own site, product, menu, offer, or service page. NearIQ fetches bounded public HTML, respects robots rules, strips scripts/styles, and treats extracted text as untrusted reference material. |
variationCount | integer | no | Number of distinct draft variations to create. Range 1 to 5; defaults to 1. Each variation consumes one content-generation unit. |
refinementFeedback | string | no | User feedback for revising a prior draft, up to 1,000 characters. Requires previousOutput. |
previousOutput | object or string | no | The prior generated content to revise. Requires refinementFeedback; maximum serialized size is 50 KB. |
sourceGenerationId | UUID | no | Optional original generated asset id for refinement requests. When it belongs to the active business, the first 3 refinements of that source asset per UTC day do not count against contentStudioDaily; later refinements consume normal daily content quota. |
Refinement example
Create response
Access
The endpoint uses the caller’s active personal or organization business context. Organization members only see history for businesses they can access.POST also requires the member’s content_studio_generate organization permission when the active business belongs to a team workspace. Accounts below Growth receive 403. API keys without competitors:read on GET or content:write on POST receive 403 requiredScope.
Generated history stores structured output and derived source counts. It does not store raw review text.
Dashboard approval signals
The dashboard records approval signals when a signed-in user publishes, approves, rejects, or edits a generated draft.GET /api/businesses/me/content/:id
Returns one generated content item for the active business. This dashboard endpoint uses the signed-in app session and the same Growth+ content-studio gate as the history endpoint.PATCH /api/businesses/me/content/:id
Saves deterministic dashboard edits to generated content or updates generated content status from dashboard actions such as publish, approve, or reject. The same route is also documented asPATCH /api/businesses/me/content/{id} for clients that use brace-style path params.
Direct edit request body
| Name | Type | Required | Notes |
|---|---|---|---|
editedContent | object | no | Full edited generated-content object to save. Maximum serialized size is 50 KB. |
content | object | no | Alias for editedContent; send only one of the two. |
topic | string or null | no | Optional edited topic, up to 180 characters. |
edited when editedContent changes.
Status request body
| Name | Type | Required | Notes |
|---|---|---|---|
action | enum | yes | publish, approve, or reject. |
publishedTo | string | no | Destination label such as manual, social, or website. |
publishedText | string | no | Final text, up to 50 KB. |
editDistanceRatio | number | no | Optional client-computed ratio from 0 to 1. |
DELETE /api/businesses/me/content/:id
Deletes a generated content item from the active business history.PATCH /api/businesses/me/content/:id/feedback
This dashboard endpoint uses the active personal or organization business context and returns401 when no user session is present. It is not a public API-key endpoint.
Request body
| Name | Type | Required | Notes |
|---|---|---|---|
rating | enum | no | good or bad. |
publishDecision | enum | no | published, rejected, or abandoned. |
publishedText | string | no | Final edited text, up to 50 KB. NearIQ calculates edit distance from the generated draft. |
publishedTo | string | no | Optional destination label such as manual, social, or website. |
PATCH /api/businesses/me/content/feedback
Legacy compatibility endpoint for feedback updates by body ID. PreferPATCH /api/businesses/me/content/{id}/feedback for new integrations.
contentGenerationId, NearIQ also links the
post to the generation and records a social publish selection event. Gap
analysis and intelligence reports use those aggregate content effectiveness
signals when enough history exists.
POST /api/businesses/me/content/music
Generates background music for Growth+ content workflows.POST /api/businesses/me/content/voice
Generates a voiceover draft for Growth+ content workflows.POST /api/businesses/me/video
Creates a video generation job for the active business. The route supports prompt-only video, prompt-image video, and ad/content-studio creative intent.GET /api/businesses/me/video
Returns video job status, or a signed download whenid, download=1, and a valid composite token are present.
POST /api/businesses/me/video/talking-avatar
Creates a talking-avatar video render from an HTTPS avatar image plus either script-to-speech, a saved voice profile, or a pre-rendered HTTPS audio URL. This is a dashboard-session route for Content Studio and requires the active team member to havecreate_video; using a saved voice profile also requires manage_voice.
The route requires explicit consent fields so uploaded photos, cloned voices, and AI-generated labels are auditable. Billing is charge-on-completed-render: a processing ledger row is created with zero credits, then video credits are deducted only when the provider reports a completed MP4.
GET /api/businesses/me/video/talking-avatar
Returns the talking-avatar config when noid is supplied. With an id, polls provider status, updates video_generations, and charges credits only after completion. Add download=1 to proxy the completed MP4 through the app session.
POST /api/businesses/me/video/composite
Queues final video compositing with captions, voice, music, and overlay settings.GET /api/businesses/me/video/composite
Polls composite status byjobId and jobToken.
POST /api/businesses/me/images/generate
Generates a draft image for Content Studio.context is required (gbp_post, social, product, service, or general). The optional style must be one of the 15 presets (photoreal, food_photo, product_photo, interior, social_graphic, logo_text, brand_safe, infographic, before_after, team_action, event_promo, seasonal, menu_board, service_showcase, custom); it defaults to photoreal. Optional size (1024x1024, 1792x1024, 1024x1792), quality (standard, hd), and providerPreset (auto, text_and_logo, brand_graphic, photoreal, general) are also accepted.
POST /api/businesses/me/images/edit
Creates an edited or variation image from a transient source image. Uploaded source images are used for the request and are not stored as generated library assets.image is required and must be an HTTPS URL or a PNG/JPEG/WebP data URL. Optional size (1024x1024, 1792x1024, 1024x1792) defaults to 1024x1024, which preserves the source aspect ratio.
POST /api/businesses/me/images/transform
Applies a deterministic, local image edit to a transient source image — no generative AI and no paid provider call. Each request runs exactly oneoperation. Source images are transient HTTPS URLs or bounded data URLs and are not stored; the edited result is returned as a hosted URL.
image is required and must be an HTTPS URL or a PNG/JPEG/WebP data URL. Optional format (webp, png, jpeg) defaults to webp. Inputs larger than 4000px on either axis are downscaled before processing.
Operations
operation.type | Fields | Effect |
|---|---|---|
crop | x, y, w, h (integers), optional unit (px or percent, default px) | Extracts a rectangle anchored at x/y, clamped to the image bounds. The dashboard freeform crop sends percent units. |
aspect | ratio (9:16, 1:1, 4:5, 16:9, 1.91:1) | Center-crops to the largest area of the requested social ratio. Presets cover Reels/Stories (9:16), square (1:1), portrait (4:5), landscape (16:9), and link previews (1.91:1). |
resize | w and/or h (integers), fit (cover, contain, fill, inside, outside, default cover) | Resizes to the target dimensions; at least one of w/h is required. |
rotate | deg (integer, -360 to 360) | Rotates by the given angle on a transparent background. |
flip | none | Mirrors vertically (top-to-bottom). |
flop | none | Mirrors horizontally (left-to-right). |
grayscale | none | Converts to grayscale. |
adjust | one or more of brightness, saturation (0.1–3 multipliers), contrast (0.1–3) | Adjusts tone; at least one field is required. |
format | none | Re-encodes to the requested format with no geometry or color change. |
mockup | device (laptop, phone, default laptop) | Composites the image into a clean device frame. |
text_overlay | text, optional cta, x, y, w, fontSize, align (left, center, right), style (dark, light, brand), and unit (px or percent, default px) | Adds a branded headline block and optional CTA. Dashboard overlays use percent placement so output matches the preview across image sizes. |
Dashboard media endpoint errors
| Status | Meaning |
|---|---|
400 | Invalid JSON, missing IDs, or unsupported media settings |
401 | Missing dashboard session |
403 | Plan or organization permission does not allow the requested action |
404 | Active business, content item, or media job not found |
429 | Plan usage limit reached |
500 | Generation, status, or storage operation failed |
Related endpoints
- Image Generation — generate AI images with 15 style presets
- Video Generation — generate AI video clips with voiceover