# Artguru Open API > Turn customer materials and AI commercial drafts into print-ready assets with the Artguru Open API. This file contains all documentation content in a single document following the llmstxt.org standard. ## Authentication This section provides a detailed guide on how to access Artguru OpenAPI and authenticate your requests to ensure secure usage of our API services. ## API Endpoint ``` https://api.artguru.ai ``` ## Authentication Artguru OpenAPI uses the `x-api-key` header for authentication. You must include your API key in the `x-api-key` header of every request. ``` x-api-key: ``` Here, `` is the API key you obtained from [https://www.artguru.ai/create-api-key/](https://www.artguru.ai/create-api-key/). ### How to Obtain an API Key 1. Visit the [Artguru Developer Platform](https://www.artguru.ai/create-api-key/) (register for an account if you haven't already). 2. Keep your API key secure and avoid sharing it. **To simplify the API trial process during the beta phase, please note the following:** - The API is currently available only to [Artguru](https://www.artguru.ai/) subscribers. Credit balance and usage records are shared with your Artguru subscription account. - The billing model may differ from the final public release. Please stay tuned for official updates. - Rest assured, the API integration method will remain the same, and no additional development changes will be required in the future. ## Example Request (Using cURL) Below is an example of sending a request using cURL, demonstrating how to include the `x-api-key` and `Content-Type` headers: ```bash curl --location 'https://api.artguru.ai/api/v1/enhance/generate' \ --header 'x-api-key: ' \ --header 'Content-Type: application/json' \ --data '{ "image": "https://img.artguru.ai/upscale/d6e711de-ddad-4019-892f-837a8a421fc5.jpg" }' ``` ## Error Handling If your request is missing or contains an invalid API key, the API will return a `401 Unauthorized` error. You should verify your API key and ensure it is correctly included in the request header. Other common HTTP status codes include: - `400 Bad Request` — The request parameters are incomplete or incorrectly formatted. - `429 Too Many Requests` — Excessive request rate. - `500 Internal Server Error` — A server-side error occurred. The API also returns a JSON response body with `code` and `message` fields to provide more detailed error information: - `0`: Success - Non-zero: error — check `message` for details (e.g. `24403`: not subscribed or out of the subscription period) ## Summary To successfully access Artguru OpenAPI, you need to: 1. Use the correct API endpoint. 2. Include a valid API key in the `x-api-key` header. By following these steps, you can securely and effectively utilize the features of Artguru Open API. If you encounter any issues during access or authentication, please contact our technical support team promptly. > Contact email: support@artguru.ai --- ## Introduction The Artguru AI API provides access to state-of-the-art AI models for image generation, enhancement, and editing. Our API is designed to be simple, reliable, and scalable for applications of any size. **Base URL:** `https://api.artguru.ai/` ## Features - 🖼️ Image enhancement and upscaling - 🎨 Image-to-image generation with advanced AI models - ⚡ Fast processing with optimized infrastructure - 🔒 Secure API with authentication and rate limiting --- ## Pricing Credits are deducted based on the feature used and the parameters selected. The following table outlines the consumption rates: | **Features** | **Token Consumption** | |---|---| | Photo Enhance | 1 credit/image | | Image to Image (AI Art) | 1 credit/image | ## Notes - Credits are deducted immediately upon successful execution of the request. - Failed requests do not incur any credit deduction. :::caution Open testing period To provide a more efficient testing experience, during the open testing period, API credits and benefits will be shared with your Artguru.ai subscription. Once the testing phase concludes, you will be able to purchase API access separately without needing an Artguru subscription. ::: --- ## Use with AI Let AI coding tools (Cursor, Claude Code, VS Code + Copilot/Cline, Windsurf, etc.) read this API documentation while writing your integration code. ## Option 1 — Plain-text docs (no setup) Every page of this site is available as raw Markdown for AI consumption: - [`/llms.txt`](pathname:///llms.txt) — index of all documentation pages - [`/llms-full.txt`](pathname:///llms-full.txt) — the entire documentation in one file - The machine-readable OpenAPI spec: [`/openapi/artguru-open-api.json`](pathname:///openapi/artguru-open-api.json) Point your AI tool at any of these URLs — no installation required. ## Option 2 — MCP server For richer integration (endpoint listing, per-endpoint schema lookup, optional real API invocation), add an MCP server backed by this site's OpenAPI spec. Add the following to your tool's MCP configuration (e.g. `.cursor/mcp.json`, `claude mcp add`, or your IDE's MCP settings): ```json { "mcpServers": { "artguru-api-docs": { "command": "npx", "args": ["-y", "@ivotoby/openapi-mcp-server@1.16.1"], "env": { "API_BASE_URL": "https://api.artguru.ai", "OPENAPI_SPEC_PATH": "https://docs.artguru.ai/openapi/artguru-open-api.json", "TOOLS_MODE": "dynamic" } } } } ``` This exposes three tools to your AI assistant: `list-api-endpoints`, `get-api-endpoint-schema`, and `invoke-api-endpoint`. Node.js >= 18 must be installed. :::info Read-only by default With the configuration above, the AI can only **read** the API documentation — it cannot call the Artguru API on your behalf. To allow real API calls (`invoke-api-endpoint`), additionally provide your key: ```json "env": { "API_HEADERS": "x-api-key:" } ``` Only do this if you want the AI to execute real, credit-consuming requests. ::: :::caution Supply-chain note `@ivotoby/openapi-mcp-server` is a community-maintained package. The version is pinned above on purpose — avoid `@latest` so that an unreviewed release cannot run on your machine automatically. :::