Compare commits
8 Commits
33b01c03a8
...
fcbb5396b3
| Author | SHA1 | Date |
|---|---|---|
|
|
fcbb5396b3 | |
|
|
52649dfb3b | |
|
|
9a6c409906 | |
|
|
4303d25120 | |
|
|
308bea624e | |
|
|
dbb8504249 | |
|
|
3d18fcfeb5 | |
|
|
ef47653296 |
|
|
@ -34,7 +34,7 @@ export class ImageGenService {
|
||||||
// Use default values if not provided
|
// Use default values if not provided
|
||||||
const finalOrgSlug = orgSlug || process.env['DEFAULT_ORG_SLUG'] || 'default';
|
const finalOrgSlug = orgSlug || process.env['DEFAULT_ORG_SLUG'] || 'default';
|
||||||
const finalProjectSlug = projectSlug || process.env['DEFAULT_PROJECT_SLUG'] || 'main';
|
const finalProjectSlug = projectSlug || process.env['DEFAULT_PROJECT_SLUG'] || 'main';
|
||||||
const finalAspectRatio = aspectRatio || '1:1'; // Default to square
|
const finalAspectRatio = aspectRatio || '16:9'; // Default to widescreen
|
||||||
|
|
||||||
// Step 1: Generate image from Gemini AI
|
// Step 1: Generate image from Gemini AI
|
||||||
let generatedData: GeneratedImageData;
|
let generatedData: GeneratedImageData;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ export const IMAGE_LIMITS = {
|
||||||
export const GENERATION_LIMITS = {
|
export const GENERATION_LIMITS = {
|
||||||
MAX_PROMPT_LENGTH: 5000,
|
MAX_PROMPT_LENGTH: 5000,
|
||||||
MAX_RETRY_COUNT: 3,
|
MAX_RETRY_COUNT: 3,
|
||||||
DEFAULT_ASPECT_RATIO: '1:1',
|
DEFAULT_ASPECT_RATIO: '16:9',
|
||||||
ALLOWED_ASPECT_RATIOS: ['1:1', '16:9', '9:16', '3:2', '2:3', '4:3', '3:4'] as const,
|
ALLOWED_ASPECT_RATIOS: ['1:1', '16:9', '9:16', '3:2', '2:3', '4:3', '3:4'] as const,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -12,6 +14,19 @@ import {
|
||||||
ResponseBlock,
|
ResponseBlock,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['api-flows'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'API Reference', path: '/docs/api/' },
|
||||||
|
{ name: 'Flows', path: '/docs/api/flows/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'overview', text: 'Overview', level: 2 },
|
{ id: 'overview', text: 'Overview', level: 2 },
|
||||||
{ id: 'list-flows', text: 'List Flows', level: 2 },
|
{ id: 'list-flows', text: 'List Flows', level: 2 },
|
||||||
|
|
@ -27,7 +42,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function FlowsAPIPage() {
|
export default function FlowsAPIPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'API Reference', href: '/docs/api' },
|
{ label: 'API Reference', href: '/docs/api' },
|
||||||
|
|
@ -330,5 +348,6 @@ export default function FlowsAPIPage() {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -12,6 +14,19 @@ import {
|
||||||
ResponseBlock,
|
ResponseBlock,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['api-generations'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'API Reference', path: '/docs/api/' },
|
||||||
|
{ name: 'Generations', path: '/docs/api/generations/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'create-generation', text: 'Create Generation', level: 2 },
|
{ id: 'create-generation', text: 'Create Generation', level: 2 },
|
||||||
{ id: 'list-generations', text: 'List Generations', level: 2 },
|
{ id: 'list-generations', text: 'List Generations', level: 2 },
|
||||||
|
|
@ -24,7 +39,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function GenerationsAPIPage() {
|
export default function GenerationsAPIPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'API Reference', href: '/docs/api' },
|
{ label: 'API Reference', href: '/docs/api' },
|
||||||
|
|
@ -322,5 +340,6 @@ export default function GenerationsAPIPage() {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -12,6 +14,19 @@ import {
|
||||||
ResponseBlock,
|
ResponseBlock,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['api-images'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'API Reference', path: '/docs/api/' },
|
||||||
|
{ name: 'Images', path: '/docs/api/images/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'upload-image', text: 'Upload Image', level: 2 },
|
{ id: 'upload-image', text: 'Upload Image', level: 2 },
|
||||||
{ id: 'list-images', text: 'List Images', level: 2 },
|
{ id: 'list-images', text: 'List Images', level: 2 },
|
||||||
|
|
@ -25,7 +40,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function ImagesAPIPage() {
|
export default function ImagesAPIPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'API Reference', href: '/docs/api' },
|
{ label: 'API Reference', href: '/docs/api' },
|
||||||
|
|
@ -357,5 +375,6 @@ curl -X PUT https://api.banatie.app/api/v1/images/550e8400-e29b-41d4-a716-446655
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -12,6 +14,19 @@ import {
|
||||||
ResponseBlock,
|
ResponseBlock,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['api-live-scopes'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'API Reference', path: '/docs/api/' },
|
||||||
|
{ name: 'Live Scopes', path: '/docs/api/live-scopes/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'overview', text: 'Overview', level: 2 },
|
{ id: 'overview', text: 'Overview', level: 2 },
|
||||||
{ id: 'create-scope', text: 'Create Scope', level: 2 },
|
{ id: 'create-scope', text: 'Create Scope', level: 2 },
|
||||||
|
|
@ -26,7 +41,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function LiveScopesAPIPage() {
|
export default function LiveScopesAPIPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'API Reference', href: '/docs/api' },
|
{ label: 'API Reference', href: '/docs/api' },
|
||||||
|
|
@ -376,7 +394,7 @@ curl -X POST https://api.banatie.app/api/v1/live/scopes/hero-section/regenerate
|
||||||
[
|
[
|
||||||
<InlineCode key="p">aspectRatio</InlineCode>,
|
<InlineCode key="p">aspectRatio</InlineCode>,
|
||||||
<span key="r" className="text-gray-500">No</span>,
|
<span key="r" className="text-gray-500">No</span>,
|
||||||
'Image ratio (default: 1:1)',
|
'Image ratio (default: 16:9)',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
<InlineCode key="p">autoEnhance</InlineCode>,
|
<InlineCode key="p">autoEnhance</InlineCode>,
|
||||||
|
|
@ -415,5 +433,6 @@ curl -X POST https://api.banatie.app/api/v1/live/scopes/hero-section/regenerate
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema, API_REFERENCE_SCHEMA } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -12,6 +14,18 @@ import {
|
||||||
LinkCardGrid,
|
LinkCardGrid,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['api-overview'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'API Reference', path: '/docs/api/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'base-url', text: 'Base URL', level: 2 },
|
{ id: 'base-url', text: 'Base URL', level: 2 },
|
||||||
{ id: 'authentication', text: 'Authentication', level: 2 },
|
{ id: 'authentication', text: 'Authentication', level: 2 },
|
||||||
|
|
@ -24,7 +38,11 @@ const tocItems = [
|
||||||
|
|
||||||
export default function APIOverviewPage() {
|
export default function APIOverviewPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<JsonLd data={API_REFERENCE_SCHEMA} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'API Reference' },
|
{ label: 'API Reference' },
|
||||||
|
|
@ -235,5 +253,6 @@ export default function APIOverviewPage() {
|
||||||
</LinkCardGrid>
|
</LinkCardGrid>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,29 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
InlineCode,
|
InlineCode,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['authentication'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'Authentication', path: '/docs/authentication/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'early-access', text: 'Early Access', level: 2 },
|
{ id: 'early-access', text: 'Early Access', level: 2 },
|
||||||
{ id: 'using-your-api-key', text: 'Using Your API Key', level: 2 },
|
{ id: 'using-your-api-key', text: 'Using Your API Key', level: 2 },
|
||||||
|
|
@ -19,7 +33,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function AuthenticationPage() {
|
export default function AuthenticationPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'Authentication' },
|
{ label: 'Authentication' },
|
||||||
|
|
@ -120,5 +137,6 @@ export default function AuthenticationPage() {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -11,6 +13,18 @@ import {
|
||||||
ResponseBlock,
|
ResponseBlock,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['generation'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'Image Generation', path: '/docs/generation/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'basic-generation', text: 'Basic Generation', level: 2 },
|
{ id: 'basic-generation', text: 'Basic Generation', level: 2 },
|
||||||
{ id: 'aspect-ratios', text: 'Aspect Ratios', level: 2 },
|
{ id: 'aspect-ratios', text: 'Aspect Ratios', level: 2 },
|
||||||
|
|
@ -23,7 +37,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function GenerationPage() {
|
export default function GenerationPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'Image Generation' },
|
{ label: 'Image Generation' },
|
||||||
|
|
@ -142,7 +159,7 @@ export default function GenerationPage() {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p className="text-gray-300 leading-relaxed mt-6">
|
<p className="text-gray-300 leading-relaxed mt-6">
|
||||||
Default is <InlineCode>1:1</InlineCode> if not specified.
|
Default is <InlineCode>16:9</InlineCode> if not specified.
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
@ -259,5 +276,6 @@ export default function GenerationPage() {
|
||||||
</p>
|
</p>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -10,6 +12,18 @@ import {
|
||||||
ResponseBlock,
|
ResponseBlock,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['images'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'Working with Images', path: '/docs/images/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'image-urls', text: 'Image URLs', level: 2 },
|
{ id: 'image-urls', text: 'Image URLs', level: 2 },
|
||||||
{ id: 'uploading-images', text: 'Uploading Images', level: 2 },
|
{ id: 'uploading-images', text: 'Uploading Images', level: 2 },
|
||||||
|
|
@ -21,7 +35,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function ImagesPage() {
|
export default function ImagesPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'Working with Images' },
|
{ label: 'Working with Images' },
|
||||||
|
|
@ -210,5 +227,6 @@ curl https://api.banatie.app/api/v1/images/@brand-logo \\
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,29 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { Table } from '@/components/docs/shared/Table';
|
import { Table } from '@/components/docs/shared/Table';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
InlineCode,
|
InlineCode,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['live-urls'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
{ name: 'Live URLs', path: '/docs/live-urls/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'the-concept', text: 'The Concept', level: 2 },
|
{ id: 'the-concept', text: 'The Concept', level: 2 },
|
||||||
{ id: 'url-format', text: 'URL Format', level: 2 },
|
{ id: 'url-format', text: 'URL Format', level: 2 },
|
||||||
|
|
@ -23,7 +37,10 @@ const tocItems = [
|
||||||
|
|
||||||
export default function LiveUrlsPage() {
|
export default function LiveUrlsPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'Live URLs' },
|
{ label: 'Live URLs' },
|
||||||
|
|
@ -89,12 +106,12 @@ export default function LiveUrlsPage() {
|
||||||
[
|
[
|
||||||
<InlineCode key="p">aspectRatio</InlineCode>,
|
<InlineCode key="p">aspectRatio</InlineCode>,
|
||||||
<span key="r" className="text-gray-500">No</span>,
|
<span key="r" className="text-gray-500">No</span>,
|
||||||
'Image ratio: 1:1, 16:9, 9:16, 3:2 (default: 1:1)',
|
'Image ratio: 1:1, 16:9, 9:16, 3:2 (default: 16:9)',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
<InlineCode key="p">autoEnhance</InlineCode>,
|
<InlineCode key="p">autoEnhance</InlineCode>,
|
||||||
<span key="r" className="text-gray-500">No</span>,
|
<span key="r" className="text-gray-500">No</span>,
|
||||||
'Enable prompt enhancement (default: false)',
|
'Enable prompt enhancement (default: true)',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
<InlineCode key="p">template</InlineCode>,
|
<InlineCode key="p">template</InlineCode>,
|
||||||
|
|
@ -254,5 +271,6 @@ https://cdn.banatie.app/my-org/my-project/live/blog-images?prompt=...`}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
'use client';
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
import { TipBox } from '@/components/docs/shared/TipBox';
|
import { TipBox } from '@/components/docs/shared/TipBox';
|
||||||
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
import { CodeBlock } from '@/components/docs/shared/CodeBlock';
|
||||||
import { DocPage } from '@/components/docs/layout/DocPage';
|
import { DocPage } from '@/components/docs/layout/DocPage';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
import { createDocsMetadata, DOCS_PAGES } from '@/config/docs-seo';
|
||||||
|
import { createBreadcrumbSchema, createTechArticleSchema, HOW_TO_SCHEMA } from '@/config/docs-schema';
|
||||||
import {
|
import {
|
||||||
Hero,
|
Hero,
|
||||||
SectionHeader,
|
SectionHeader,
|
||||||
|
|
@ -11,6 +13,17 @@ import {
|
||||||
LinkCardGrid,
|
LinkCardGrid,
|
||||||
} from '@/components/docs/blocks';
|
} from '@/components/docs/blocks';
|
||||||
|
|
||||||
|
const PAGE = DOCS_PAGES['getting-started'];
|
||||||
|
|
||||||
|
export const metadata: Metadata = createDocsMetadata(PAGE);
|
||||||
|
|
||||||
|
const breadcrumbSchema = createBreadcrumbSchema([
|
||||||
|
{ name: 'Home', path: '/' },
|
||||||
|
{ name: 'Documentation', path: '/docs/' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const articleSchema = createTechArticleSchema(PAGE);
|
||||||
|
|
||||||
const tocItems = [
|
const tocItems = [
|
||||||
{ id: 'what-is-banatie', text: 'What is Banatie?', level: 2 },
|
{ id: 'what-is-banatie', text: 'What is Banatie?', level: 2 },
|
||||||
{ id: 'your-first-image', text: 'Your First Image', level: 2 },
|
{ id: 'your-first-image', text: 'Your First Image', level: 2 },
|
||||||
|
|
@ -22,7 +35,11 @@ const tocItems = [
|
||||||
|
|
||||||
export default function GettingStartedPage() {
|
export default function GettingStartedPage() {
|
||||||
return (
|
return (
|
||||||
<DocPage
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={articleSchema} />
|
||||||
|
<JsonLd data={HOW_TO_SCHEMA} />
|
||||||
|
<DocPage
|
||||||
breadcrumbItems={[
|
breadcrumbItems={[
|
||||||
{ label: 'Documentation', href: '/docs' },
|
{ label: 'Documentation', href: '/docs' },
|
||||||
{ label: 'Getting Started' },
|
{ label: 'Getting Started' },
|
||||||
|
|
@ -191,5 +208,6 @@ export default function GettingStartedPage() {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</DocPage>
|
</DocPage>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
type JsonLdProps = {
|
||||||
|
data: Record<string, unknown>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const JsonLd = ({ data }: JsonLdProps) => (
|
||||||
|
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }} />
|
||||||
|
);
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
const BASE_URL = 'https://banatie.app';
|
||||||
|
|
||||||
|
const ORGANIZATION = {
|
||||||
|
'@type': 'Organization' as const,
|
||||||
|
name: 'Banatie',
|
||||||
|
url: BASE_URL,
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BreadcrumbItem = {
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createBreadcrumbSchema = (items: BreadcrumbItem[]) => ({
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'BreadcrumbList',
|
||||||
|
itemListElement: items.map((item, index) => ({
|
||||||
|
'@type': 'ListItem',
|
||||||
|
position: index + 1,
|
||||||
|
name: item.name,
|
||||||
|
item: `${BASE_URL}${item.path}`,
|
||||||
|
})),
|
||||||
|
});
|
||||||
|
|
||||||
|
export const createTechArticleSchema = (page: { title: string; description: string; path: string }) => ({
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'TechArticle',
|
||||||
|
headline: page.title,
|
||||||
|
description: page.description,
|
||||||
|
author: ORGANIZATION,
|
||||||
|
publisher: {
|
||||||
|
...ORGANIZATION,
|
||||||
|
logo: { '@type': 'ImageObject', url: `${BASE_URL}/logo-square.png` },
|
||||||
|
},
|
||||||
|
mainEntityOfPage: { '@type': 'WebPage', '@id': `${BASE_URL}${page.path}` },
|
||||||
|
image: `${BASE_URL}/og-image.png`,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const HOW_TO_SCHEMA = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'HowTo',
|
||||||
|
name: 'How to Generate Your First AI Image with Banatie API',
|
||||||
|
description: 'Generate your first AI image in a few simple steps using Banatie REST API.',
|
||||||
|
step: [
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Get API Key',
|
||||||
|
text: 'Sign up at banatie.app to receive your API key within 24 hours.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Make API Request',
|
||||||
|
text: 'Send a POST request to /api/v1/generations with your prompt.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Use Your Image',
|
||||||
|
text: 'The response contains a CDN URL ready for production use.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const API_REFERENCE_SCHEMA = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'TechArticle',
|
||||||
|
headline: 'Banatie API Reference',
|
||||||
|
description: 'Complete REST API documentation',
|
||||||
|
about: {
|
||||||
|
'@type': 'WebAPI',
|
||||||
|
name: 'Banatie Image Generation API',
|
||||||
|
documentation: `${BASE_URL}/docs/api/`,
|
||||||
|
provider: ORGANIZATION,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
import type { Metadata } from 'next';
|
||||||
|
|
||||||
|
const BASE_URL = 'https://banatie.app';
|
||||||
|
|
||||||
|
export const SEO_DEFAULTS = {
|
||||||
|
siteName: 'Banatie',
|
||||||
|
locale: 'en_US',
|
||||||
|
author: 'Banatie',
|
||||||
|
ogImage: {
|
||||||
|
url: `${BASE_URL}/og-image.png`,
|
||||||
|
width: 1200,
|
||||||
|
height: 630,
|
||||||
|
alt: 'Banatie - AI Image Generation API for Developers',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DocsPageSeo = {
|
||||||
|
path: string;
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
keywords: string[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export const createDocsMetadata = (page: DocsPageSeo): Metadata => {
|
||||||
|
const url = `${BASE_URL}${page.path}`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: page.title,
|
||||||
|
description: page.description,
|
||||||
|
authors: [{ name: SEO_DEFAULTS.author }],
|
||||||
|
keywords: page.keywords,
|
||||||
|
robots: 'index, follow',
|
||||||
|
alternates: {
|
||||||
|
canonical: url,
|
||||||
|
languages: { en: url, 'x-default': url },
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: page.title,
|
||||||
|
description: page.description,
|
||||||
|
url,
|
||||||
|
siteName: SEO_DEFAULTS.siteName,
|
||||||
|
locale: SEO_DEFAULTS.locale,
|
||||||
|
type: 'article',
|
||||||
|
images: [SEO_DEFAULTS.ogImage],
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
card: 'summary_large_image',
|
||||||
|
title: page.title,
|
||||||
|
description: page.description,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DOCS_PAGES = {
|
||||||
|
'getting-started': {
|
||||||
|
path: '/docs/',
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description:
|
||||||
|
'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
keywords: ['banatie api', 'image generation api', 'ai image api tutorial', 'getting started', 'api quickstart'],
|
||||||
|
},
|
||||||
|
generation: {
|
||||||
|
path: '/docs/generation/',
|
||||||
|
title: 'Image Generation Guide | Banatie API Docs',
|
||||||
|
description:
|
||||||
|
'Generate AI images from text prompts. Aspect ratios, prompt templates, reference images, and generation chaining.',
|
||||||
|
keywords: ['image generation', 'text to image api', 'ai image prompt', 'aspect ratio', 'reference images'],
|
||||||
|
},
|
||||||
|
images: {
|
||||||
|
path: '/docs/images/',
|
||||||
|
title: 'Working with Images | Banatie API Docs',
|
||||||
|
description:
|
||||||
|
'Upload, manage, and organize images. CDN delivery, aliases for easy reference, and image management via API.',
|
||||||
|
keywords: ['image upload api', 'cdn image delivery', 'image aliases', 'image management', 'organize images'],
|
||||||
|
},
|
||||||
|
'live-urls': {
|
||||||
|
path: '/docs/live-urls/',
|
||||||
|
title: 'Live URLs — Generate Images from URL | Banatie API Docs',
|
||||||
|
description:
|
||||||
|
'Generate images directly from URL parameters. No API calls needed — use the URL in img tags. Automatic caching.',
|
||||||
|
keywords: ['live url image generation', 'url to image', 'dynamic image generation', 'image from url', 'cached image api'],
|
||||||
|
},
|
||||||
|
authentication: {
|
||||||
|
path: '/docs/authentication/',
|
||||||
|
title: 'Authentication | Banatie API Docs',
|
||||||
|
description: 'How to authenticate with Banatie API using API keys. Get your key and start generating images.',
|
||||||
|
keywords: ['api authentication', 'api key', 'banatie api key', 'x-api-key header'],
|
||||||
|
},
|
||||||
|
'api-overview': {
|
||||||
|
path: '/docs/api/',
|
||||||
|
title: 'API Reference | Banatie Docs',
|
||||||
|
description: 'Complete REST API reference for Banatie. All endpoints, parameters, response formats, and error codes.',
|
||||||
|
keywords: ['banatie api reference', 'rest api documentation', 'api endpoints', 'image generation api docs'],
|
||||||
|
},
|
||||||
|
'api-generations': {
|
||||||
|
path: '/docs/api/generations/',
|
||||||
|
title: 'Generations API | Banatie API Reference',
|
||||||
|
description: 'Create, list, update, and delete AI image generations. Full endpoint documentation with examples.',
|
||||||
|
keywords: ['generations api', 'create generation', 'image generation endpoint', 'regenerate image api'],
|
||||||
|
},
|
||||||
|
'api-images': {
|
||||||
|
path: '/docs/api/images/',
|
||||||
|
title: 'Images API | Banatie API Reference',
|
||||||
|
description: 'Upload, list, update, and delete images. Manage aliases and access images via CDN.',
|
||||||
|
keywords: ['images api', 'upload image api', 'image cdn api', 'image alias api'],
|
||||||
|
},
|
||||||
|
'api-flows': {
|
||||||
|
path: '/docs/api/flows/',
|
||||||
|
title: 'Flows API | Banatie API Reference',
|
||||||
|
description: 'Manage generation flows. List, update, and delete flows that group related generations together.',
|
||||||
|
keywords: ['flows api', 'generation flow', 'chain generations', 'flow management api'],
|
||||||
|
},
|
||||||
|
'api-live-scopes': {
|
||||||
|
path: '/docs/api/live-scopes/',
|
||||||
|
title: 'Live Scopes API | Banatie API Reference',
|
||||||
|
description: 'Manage live URL scopes. Create, configure, and control live image generation endpoints.',
|
||||||
|
keywords: ['live scopes api', 'live url management', 'scope limits', 'live generation api'],
|
||||||
|
},
|
||||||
|
} as const satisfies Record<string, DocsPageSeo>;
|
||||||
|
|
@ -0,0 +1,644 @@
|
||||||
|
# Documentation SEO Task
|
||||||
|
|
||||||
|
**Date:** January 1, 2026
|
||||||
|
**Purpose:** Add complete SEO metadata to all documentation pages
|
||||||
|
**Priority:** High — required for proper indexing
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Reference: Main Page Pattern
|
||||||
|
|
||||||
|
Follow the same meta tag structure as the main page (`/`):
|
||||||
|
|
||||||
|
```html
|
||||||
|
<meta name="author" content="Banatie">
|
||||||
|
<meta name="keywords" content="...">
|
||||||
|
<meta name="robots" content="index, follow">
|
||||||
|
<link rel="canonical" href="https://banatie.app/.../">
|
||||||
|
<link rel="alternate" hreflang="en" href="https://banatie.app/.../">
|
||||||
|
<link rel="alternate" hreflang="x-default" href="https://banatie.app/.../">
|
||||||
|
<meta property="og:title" content="...">
|
||||||
|
<meta property="og:description" content="...">
|
||||||
|
<meta property="og:url" content="https://banatie.app/.../">
|
||||||
|
<meta property="og:site_name" content="Banatie">
|
||||||
|
<meta property="og:locale" content="en_US">
|
||||||
|
<meta property="og:image" content="https://banatie.app/og-image.png">
|
||||||
|
<meta property="og:image:width" content="1200">
|
||||||
|
<meta property="og:image:height" content="630">
|
||||||
|
<meta property="og:image:alt" content="Banatie - AI Image Generation API for Developers">
|
||||||
|
<meta property="og:type" content="article">
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
<meta name="twitter:title" content="...">
|
||||||
|
<meta name="twitter:description" content="...">
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key rules:**
|
||||||
|
- All canonical URLs end with trailing slash: `/docs/` not `/docs`
|
||||||
|
- Use same OG image for all docs pages: `https://banatie.app/og-image.png`
|
||||||
|
- og:type should be `article` for docs (not `website`)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Implementation in Next.js
|
||||||
|
|
||||||
|
### Option 1: Static Metadata (Recommended for docs)
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
// In each page.tsx
|
||||||
|
import { Metadata } from 'next';
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Page Title | Banatie Docs',
|
||||||
|
description: 'Page description...',
|
||||||
|
authors: [{ name: 'Banatie' }],
|
||||||
|
keywords: ['keyword1', 'keyword2'],
|
||||||
|
robots: 'index, follow',
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/page/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/page/',
|
||||||
|
'x-default': 'https://banatie.app/docs/page/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Page Title | Banatie Docs',
|
||||||
|
description: 'Page description...',
|
||||||
|
url: 'https://banatie.app/docs/page/',
|
||||||
|
siteName: 'Banatie',
|
||||||
|
locale: 'en_US',
|
||||||
|
type: 'article',
|
||||||
|
images: [
|
||||||
|
{
|
||||||
|
url: 'https://banatie.app/og-image.png',
|
||||||
|
width: 1200,
|
||||||
|
height: 630,
|
||||||
|
alt: 'Banatie - AI Image Generation API for Developers',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
card: 'summary_large_image',
|
||||||
|
title: 'Page Title | Banatie Docs',
|
||||||
|
description: 'Page description...',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### Option 2: Shared Metadata in Layout
|
||||||
|
|
||||||
|
Create base metadata in `/docs/layout.tsx` and extend in pages:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
// In layout.tsx - shared defaults
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
authors: [{ name: 'Banatie' }],
|
||||||
|
robots: 'index, follow',
|
||||||
|
openGraph: {
|
||||||
|
siteName: 'Banatie',
|
||||||
|
locale: 'en_US',
|
||||||
|
type: 'article',
|
||||||
|
images: [
|
||||||
|
{
|
||||||
|
url: 'https://banatie.app/og-image.png',
|
||||||
|
width: 1200,
|
||||||
|
height: 630,
|
||||||
|
alt: 'Banatie - AI Image Generation API for Developers',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
card: 'summary_large_image',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
Then in each page, only specify unique fields (title, description, canonical).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Metadata for All 10 Pages
|
||||||
|
|
||||||
|
### 1. `/docs/` — Getting Started
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description: 'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
keywords: ['banatie api', 'image generation api', 'ai image api tutorial', 'getting started', 'api quickstart'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/',
|
||||||
|
'x-default': 'https://banatie.app/docs/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description: 'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
url: 'https://banatie.app/docs/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description: 'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. `/docs/generation/` — Image Generation
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Image Generation Guide | Banatie API Docs',
|
||||||
|
description: 'Generate AI images from text prompts. Aspect ratios, prompt templates, reference images, and generation chaining.',
|
||||||
|
keywords: ['image generation', 'text to image api', 'ai image prompt', 'aspect ratio', 'reference images'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/generation/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/generation/',
|
||||||
|
'x-default': 'https://banatie.app/docs/generation/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Image Generation Guide | Banatie API Docs',
|
||||||
|
description: 'Generate AI images from text prompts. Aspect ratios, prompt templates, reference images, and generation chaining.',
|
||||||
|
url: 'https://banatie.app/docs/generation/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Image Generation Guide | Banatie API Docs',
|
||||||
|
description: 'Generate AI images from text prompts. Aspect ratios, prompt templates, reference images, and generation chaining.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. `/docs/images/` — Working with Images
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Working with Images | Banatie API Docs',
|
||||||
|
description: 'Upload, manage, and organize images. CDN delivery, aliases for easy reference, and image management via API.',
|
||||||
|
keywords: ['image upload api', 'cdn image delivery', 'image aliases', 'image management', 'organize images'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/images/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/images/',
|
||||||
|
'x-default': 'https://banatie.app/docs/images/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Working with Images | Banatie API Docs',
|
||||||
|
description: 'Upload, manage, and organize images. CDN delivery, aliases for easy reference, and image management via API.',
|
||||||
|
url: 'https://banatie.app/docs/images/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Working with Images | Banatie API Docs',
|
||||||
|
description: 'Upload, manage, and organize images. CDN delivery, aliases for easy reference, and image management via API.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. `/docs/live-urls/` — Live URLs
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Live URLs — Generate Images from URL | Banatie API Docs',
|
||||||
|
description: 'Generate images directly from URL parameters. No API calls needed — use the URL in img tags. Automatic caching.',
|
||||||
|
keywords: ['live url image generation', 'url to image', 'dynamic image generation', 'image from url', 'cached image api'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/live-urls/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/live-urls/',
|
||||||
|
'x-default': 'https://banatie.app/docs/live-urls/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Live URLs — Generate Images from URL | Banatie API Docs',
|
||||||
|
description: 'Generate images directly from URL parameters. No API calls needed — use the URL in img tags. Automatic caching.',
|
||||||
|
url: 'https://banatie.app/docs/live-urls/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Live URLs — Generate Images from URL | Banatie API Docs',
|
||||||
|
description: 'Generate images directly from URL parameters. No API calls needed — use the URL in img tags. Automatic caching.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 5. `/docs/authentication/` — Authentication
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Authentication | Banatie API Docs',
|
||||||
|
description: 'How to authenticate with Banatie API using API keys. Get your key and start generating images.',
|
||||||
|
keywords: ['api authentication', 'api key', 'banatie api key', 'x-api-key header'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/authentication/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/authentication/',
|
||||||
|
'x-default': 'https://banatie.app/docs/authentication/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Authentication | Banatie API Docs',
|
||||||
|
description: 'How to authenticate with Banatie API using API keys. Get your key and start generating images.',
|
||||||
|
url: 'https://banatie.app/docs/authentication/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Authentication | Banatie API Docs',
|
||||||
|
description: 'How to authenticate with Banatie API using API keys. Get your key and start generating images.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6. `/docs/api/` — API Reference Overview
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'API Reference | Banatie Docs',
|
||||||
|
description: 'Complete REST API reference for Banatie. All endpoints, parameters, response formats, and error codes.',
|
||||||
|
keywords: ['banatie api reference', 'rest api documentation', 'api endpoints', 'image generation api docs'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/api/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/api/',
|
||||||
|
'x-default': 'https://banatie.app/docs/api/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'API Reference | Banatie Docs',
|
||||||
|
description: 'Complete REST API reference for Banatie. All endpoints, parameters, response formats, and error codes.',
|
||||||
|
url: 'https://banatie.app/docs/api/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'API Reference | Banatie Docs',
|
||||||
|
description: 'Complete REST API reference for Banatie. All endpoints, parameters, response formats, and error codes.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 7. `/docs/api/generations/` — Generations API
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Generations API | Banatie API Reference',
|
||||||
|
description: 'Create, list, update, and delete AI image generations. Full endpoint documentation with examples.',
|
||||||
|
keywords: ['generations api', 'create generation', 'image generation endpoint', 'regenerate image api'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/api/generations/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/api/generations/',
|
||||||
|
'x-default': 'https://banatie.app/docs/api/generations/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Generations API | Banatie API Reference',
|
||||||
|
description: 'Create, list, update, and delete AI image generations. Full endpoint documentation with examples.',
|
||||||
|
url: 'https://banatie.app/docs/api/generations/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Generations API | Banatie API Reference',
|
||||||
|
description: 'Create, list, update, and delete AI image generations. Full endpoint documentation with examples.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 8. `/docs/api/images/` — Images API
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Images API | Banatie API Reference',
|
||||||
|
description: 'Upload, list, update, and delete images. Manage aliases and access images via CDN.',
|
||||||
|
keywords: ['images api', 'upload image api', 'image cdn api', 'image alias api'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/api/images/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/api/images/',
|
||||||
|
'x-default': 'https://banatie.app/docs/api/images/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Images API | Banatie API Reference',
|
||||||
|
description: 'Upload, list, update, and delete images. Manage aliases and access images via CDN.',
|
||||||
|
url: 'https://banatie.app/docs/api/images/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Images API | Banatie API Reference',
|
||||||
|
description: 'Upload, list, update, and delete images. Manage aliases and access images via CDN.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 9. `/docs/api/flows/` — Flows API
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Flows API | Banatie API Reference',
|
||||||
|
description: 'Manage generation flows. List, update, and delete flows that group related generations together.',
|
||||||
|
keywords: ['flows api', 'generation flow', 'chain generations', 'flow management api'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/api/flows/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/api/flows/',
|
||||||
|
'x-default': 'https://banatie.app/docs/api/flows/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Flows API | Banatie API Reference',
|
||||||
|
description: 'Manage generation flows. List, update, and delete flows that group related generations together.',
|
||||||
|
url: 'https://banatie.app/docs/api/flows/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Flows API | Banatie API Reference',
|
||||||
|
description: 'Manage generation flows. List, update, and delete flows that group related generations together.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### 10. `/docs/api/live-scopes/` — Live Scopes API
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Live Scopes API | Banatie API Reference',
|
||||||
|
description: 'Manage live URL scopes. Create, configure, and control live image generation endpoints.',
|
||||||
|
keywords: ['live scopes api', 'live url management', 'scope limits', 'live generation api'],
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/api/live-scopes/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/api/live-scopes/',
|
||||||
|
'x-default': 'https://banatie.app/docs/api/live-scopes/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Live Scopes API | Banatie API Reference',
|
||||||
|
description: 'Manage live URL scopes. Create, configure, and control live image generation endpoints.',
|
||||||
|
url: 'https://banatie.app/docs/api/live-scopes/',
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
title: 'Live Scopes API | Banatie API Reference',
|
||||||
|
description: 'Manage live URL scopes. Create, configure, and control live image generation endpoints.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## JSON-LD Structured Data
|
||||||
|
|
||||||
|
### Create JsonLd Component
|
||||||
|
|
||||||
|
Create `/components/seo/JsonLd.tsx`:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
interface JsonLdProps {
|
||||||
|
data: Record<string, unknown>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function JsonLd({ data }: JsonLdProps) {
|
||||||
|
return (
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### BreadcrumbList Schema (All pages)
|
||||||
|
|
||||||
|
Add to every docs page:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
const breadcrumbSchema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'BreadcrumbList',
|
||||||
|
itemListElement: [
|
||||||
|
{
|
||||||
|
'@type': 'ListItem',
|
||||||
|
position: 1,
|
||||||
|
name: 'Home',
|
||||||
|
item: 'https://banatie.app/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'ListItem',
|
||||||
|
position: 2,
|
||||||
|
name: 'Documentation',
|
||||||
|
item: 'https://banatie.app/docs/',
|
||||||
|
},
|
||||||
|
// Add more levels as needed
|
||||||
|
],
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### TechArticle Schema (Guide pages)
|
||||||
|
|
||||||
|
For `/docs/`, `/docs/generation/`, `/docs/images/`, `/docs/live-urls/`, `/docs/authentication/`:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
const articleSchema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'TechArticle',
|
||||||
|
headline: 'Page Title',
|
||||||
|
description: 'Page description',
|
||||||
|
author: {
|
||||||
|
'@type': 'Organization',
|
||||||
|
name: 'Banatie',
|
||||||
|
url: 'https://banatie.app/',
|
||||||
|
},
|
||||||
|
publisher: {
|
||||||
|
'@type': 'Organization',
|
||||||
|
name: 'Banatie',
|
||||||
|
url: 'https://banatie.app/',
|
||||||
|
logo: {
|
||||||
|
'@type': 'ImageObject',
|
||||||
|
url: 'https://banatie.app/logo.png',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mainEntityOfPage: {
|
||||||
|
'@type': 'WebPage',
|
||||||
|
'@id': 'https://banatie.app/docs/page/',
|
||||||
|
},
|
||||||
|
image: 'https://banatie.app/og-image.png',
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### HowTo Schema (Get Started page)
|
||||||
|
|
||||||
|
For `/docs/` specifically — shows steps in search results:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
const howToSchema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'HowTo',
|
||||||
|
name: 'How to Generate Your First AI Image with Banatie API',
|
||||||
|
description: 'Generate your first AI image in a few simple steps using Banatie REST API.',
|
||||||
|
step: [
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Get API Key',
|
||||||
|
text: 'Sign up at banatie.app to receive your API key within 24 hours.',
|
||||||
|
url: 'https://banatie.app/docs/#get-your-api-key',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Make API Request',
|
||||||
|
text: 'Send a POST request to /api/v1/generations with your prompt.',
|
||||||
|
url: 'https://banatie.app/docs/#your-first-image',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Use Your Image',
|
||||||
|
text: 'The response contains a CDN URL ready for production use.',
|
||||||
|
url: 'https://banatie.app/docs/#production-ready',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
### APIReference Schema (API pages)
|
||||||
|
|
||||||
|
For `/docs/api/` and sub-pages:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
const apiSchema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'TechArticle',
|
||||||
|
headline: 'Banatie API Reference',
|
||||||
|
description: 'Complete REST API documentation',
|
||||||
|
about: {
|
||||||
|
'@type': 'WebAPI',
|
||||||
|
name: 'Banatie Image Generation API',
|
||||||
|
documentation: 'https://banatie.app/docs/api/',
|
||||||
|
provider: {
|
||||||
|
'@type': 'Organization',
|
||||||
|
name: 'Banatie',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Implementation Example
|
||||||
|
|
||||||
|
Full example for `/docs/page.tsx`:
|
||||||
|
|
||||||
|
```tsx
|
||||||
|
import { Metadata } from 'next';
|
||||||
|
import { JsonLd } from '@/components/seo/JsonLd';
|
||||||
|
// ... other imports
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description: 'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
authors: [{ name: 'Banatie' }],
|
||||||
|
keywords: ['banatie api', 'image generation api', 'ai image api tutorial', 'getting started', 'api quickstart'],
|
||||||
|
robots: 'index, follow',
|
||||||
|
alternates: {
|
||||||
|
canonical: 'https://banatie.app/docs/',
|
||||||
|
languages: {
|
||||||
|
'en': 'https://banatie.app/docs/',
|
||||||
|
'x-default': 'https://banatie.app/docs/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
openGraph: {
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description: 'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
url: 'https://banatie.app/docs/',
|
||||||
|
siteName: 'Banatie',
|
||||||
|
locale: 'en_US',
|
||||||
|
type: 'article',
|
||||||
|
images: [
|
||||||
|
{
|
||||||
|
url: 'https://banatie.app/og-image.png',
|
||||||
|
width: 1200,
|
||||||
|
height: 630,
|
||||||
|
alt: 'Banatie - AI Image Generation API for Developers',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
twitter: {
|
||||||
|
card: 'summary_large_image',
|
||||||
|
title: 'Getting Started with Banatie API | AI Image Generation',
|
||||||
|
description: 'Generate your first AI image in a few simple steps. REST API for production-ready image assets via CDN.',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const breadcrumbSchema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'BreadcrumbList',
|
||||||
|
itemListElement: [
|
||||||
|
{ '@type': 'ListItem', position: 1, name: 'Home', item: 'https://banatie.app/' },
|
||||||
|
{ '@type': 'ListItem', position: 2, name: 'Documentation', item: 'https://banatie.app/docs/' },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const howToSchema = {
|
||||||
|
'@context': 'https://schema.org',
|
||||||
|
'@type': 'HowTo',
|
||||||
|
name: 'How to Generate Your First AI Image with Banatie API',
|
||||||
|
description: 'Generate your first AI image in a few simple steps using Banatie REST API.',
|
||||||
|
step: [
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Get API Key',
|
||||||
|
text: 'Sign up at banatie.app to receive your API key within 24 hours.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Make API Request',
|
||||||
|
text: 'Send a POST request to /api/v1/generations with your prompt.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'@type': 'HowToStep',
|
||||||
|
name: 'Use Your Image',
|
||||||
|
text: 'The response contains a CDN URL ready for production use.',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function GettingStartedPage() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<JsonLd data={breadcrumbSchema} />
|
||||||
|
<JsonLd data={howToSchema} />
|
||||||
|
{/* ... rest of page content */}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
Before marking complete:
|
||||||
|
|
||||||
|
- [ ] All 10 pages have metadata export
|
||||||
|
- [ ] All canonical URLs end with trailing slash
|
||||||
|
- [ ] All pages use same OG image
|
||||||
|
- [ ] og:type is "article" (not "website")
|
||||||
|
- [ ] hreflang alternates present (en + x-default)
|
||||||
|
- [ ] JsonLd component created
|
||||||
|
- [ ] BreadcrumbList schema on all pages
|
||||||
|
- [ ] TechArticle schema on guide pages
|
||||||
|
- [ ] HowTo schema on /docs/ page
|
||||||
|
- [ ] Remove 'use client' if not needed (metadata requires server component)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Important Note on 'use client'
|
||||||
|
|
||||||
|
Next.js metadata export only works in Server Components. If pages currently have `'use client'`, you need to:
|
||||||
|
|
||||||
|
1. Split into Server Component (page with metadata) and Client Component (interactive content)
|
||||||
|
2. Or move interactive parts to child components
|
||||||
|
|
||||||
|
Example structure:
|
||||||
|
```
|
||||||
|
/docs/
|
||||||
|
├── page.tsx # Server Component with metadata
|
||||||
|
└── _components/
|
||||||
|
└── DocsContent.tsx # Client Component with interactivity
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**End of Task**
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
# Gemini Image Models - Sizes & Aspect Ratios Reference
|
||||||
|
|
||||||
|
Quick reference for Gemini image generation models supported by Banatie API.
|
||||||
|
|
||||||
|
## Gemini 2.5 Flash Image
|
||||||
|
|
||||||
|
**Model ID:** `gemini-2.5-flash-image`
|
||||||
|
**Resolution:** 1K only
|
||||||
|
**Default:** 1:1 (1024x1024)
|
||||||
|
|
||||||
|
### Supported Aspect Ratios
|
||||||
|
|
||||||
|
| Aspect Ratio | Pixels |
|
||||||
|
|--------------|--------|
|
||||||
|
| 1:1 | 1024 x 1024 |
|
||||||
|
| 16:9 | 1408 x 768 |
|
||||||
|
| 9:16 | 768 x 1408 |
|
||||||
|
| 3:2 | 1216 x 832 |
|
||||||
|
| 2:3 | 832 x 1216 |
|
||||||
|
| 4:3 | 1152 x 896 |
|
||||||
|
| 3:4 | 896 x 1152 |
|
||||||
|
| 21:9 | 1536 x 640 |
|
||||||
|
| 4:5 | 896 x 1088 |
|
||||||
|
| 5:4 | 1088 x 896 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Gemini 3 Pro Image
|
||||||
|
|
||||||
|
**Model ID:** `gemini-3-pro-image`
|
||||||
|
**Resolutions:** 1K, 2K, 4K
|
||||||
|
**Default:** 1K resolution
|
||||||
|
|
||||||
|
### Size Options by Aspect Ratio
|
||||||
|
|
||||||
|
| Size | Aspect Ratio | Pixels |
|
||||||
|
|------|--------------|--------|
|
||||||
|
| 1K | 1:1 | 1024 x 1024 |
|
||||||
|
| 1K | 16:9 | 1408 x 768 |
|
||||||
|
| 1K | 9:16 | 768 x 1408 |
|
||||||
|
| 2K | 1:1 | 2048 x 2048 |
|
||||||
|
| 2K | 16:9 | 2816 x 1536 |
|
||||||
|
| 2K | 9:16 | 1536 x 2816 |
|
||||||
|
| 4K | 1:1 | 4096 x 4096 |
|
||||||
|
| 4K | 16:9 | 5632 x 3072 |
|
||||||
|
| 4K | 9:16 | 3072 x 5632 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Banatie API Defaults
|
||||||
|
|
||||||
|
- **Model:** Gemini 2.5 Flash Image
|
||||||
|
- **Aspect Ratio:** 16:9 (1408 x 768)
|
||||||
|
- **Resolution:** 1K (only option for 2.5 Flash)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Gemini 2.5 Flash is optimized for speed, supports only 1K resolution
|
||||||
|
- Gemini 3 Pro supports higher resolutions (2K, 4K) for production use
|
||||||
|
- All aspect ratios maintain approximately the same total pixel count per resolution tier
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Documentation TODO
|
||||||
|
|
||||||
|
**Created:** December 30, 2025
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Technical Documentation Updates
|
||||||
|
|
||||||
|
### `/docs/api/image-generation.md`
|
||||||
|
|
||||||
|
- [ ] Remove `status: "pending"` from POST response example
|
||||||
|
- [ ] Remove "Generation Status" section about polling
|
||||||
|
- [ ] Update POST response to show `status: "success"` with `outputImage` immediately
|
||||||
|
- [ ] API is synchronous — one request returns completed generation
|
||||||
|
|
||||||
|
**Reason:** The actual API behavior is synchronous. Documentation incorrectly shows async polling flow.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Website Documentation
|
||||||
|
|
||||||
|
See `documentation-section-task.md` for full specification of website docs pages.
|
||||||
|
|
||||||
|
---
|
||||||
Loading…
Reference in New Issue