1. API Key & Authentication

Get started with Durrun API access, create your API key, authenticate requests, and connect to Durrun endpoints.

Request API Access

To get started with the Durrun API, request an API account from our team. Once your account is approved, you can create and manage your API keys from the API Portal.

1

Request Account

Send a request to get API access.

2

Create API Key

Create and manage your API keys.

3

Start Integrating

Use your API key with our endpoints.

Create an API Key

After your account is approved, create an API key from your API Portal.

Your API key gives you access to all Durrun API endpoints. Keep your key secure and do not share it publicly.

API Endpoints

Use the following endpoints to access different data from Durrun.

FeatureEndpoint URLMethodDescriptionAction
Queryhttps://api.durrun.com/api/query.phpGETSearch models and integrations
Templateshttps://api.durrun.com/api/templates.phpGETGet all templates
Providershttps://api.durrun.com/api/providers.phpGETGet all providers
Modelshttps://api.durrun.com/api/models.phpGETGet all models, filter by provider or template
Model by ID & Languagehttps://api.durrun.com/api/model-code.phpGETGet integration code by model ID and language

Query

GET

Search models and integrations with a free-text query. Add a language to the query (for example "java" or "python") to get code samples in the results.

Base URL

GEThttps://api.durrun.com/api/query.php

Query parameters

NameTypeRequiredDefaultDescription
querystringRequired—Search text. Examples: Recraft vector PHP, SharpAPI summarize python.
limitintegerOptional20Results per page. Maximum 50.
cursorstringOptional—Page token. Use next_cursor from the previous response.

Request headers

HeaderValue
X-API-KEYYOUR_API_KEY
Acceptapplication/json

Example request

# 1. Request with base URL, parameters and headers
curl -G "https://api.durrun.com/api/query.php" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  --max-time 30 \
  --data-urlencode "query=SharpAPI java" \
  --data-urlencode "limit=20"

# 2. Next page: copy next_cursor from the response and add
#   --data-urlencode "cursor=NEXT_CURSOR"

Paginated: when has_more is true, send next_cursor as cursor to get the next page.

Response fields

FieldDescription
query / language / match_typeHow the query was read. language appears only when the query names one; match_type is all_words or partial.
limit / total_countResults per page and total number of matching models.
has_more / next_cursorPaging. When has_more is true, send next_cursor as cursor.
response[]List of models: model_id, model_name, version, provider, type, description, documentation_url. When a language is given: language, code, get_code.
status / messageOnly on errors, e.g. {"status":"error","message":"Invalid or missing API key."}

Templates

GET

List all templates (image, video, voiceai, web, database, and more).

Base URL

GEThttps://api.durrun.com/api/templates.php

Query parameters

NameTypeRequiredDefaultDescription
limitintegerOptional20Results per page. Maximum 50.
cursorstringOptional—Page token. Use next_cursor from the previous response.

Request headers

HeaderValue
X-API-KEYYOUR_API_KEY
Acceptapplication/json

Example request

# 1. Request with base URL, parameters and headers
curl -G "https://api.durrun.com/api/templates.php" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  --max-time 30 \
  --data-urlencode "limit=20"

# 2. Next page: copy next_cursor from the response and add
#   --data-urlencode "cursor=NEXT_CURSOR"

Paginated: when has_more is true, send next_cursor as cursor to get the next page.

Providers

GET

List all providers (openai, sharpapi, recraft, grokai, and more).

Base URL

GEThttps://api.durrun.com/api/providers.php

Query parameters

NameTypeRequiredDefaultDescription
limitintegerOptional20Results per page. Maximum 50.
cursorstringOptional—Page token. Use next_cursor from the previous response.

Request headers

HeaderValue
X-API-KEYYOUR_API_KEY
Acceptapplication/json

Example request

# 1. Request with base URL, parameters and headers
curl -G "https://api.durrun.com/api/providers.php" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  --max-time 30 \
  --data-urlencode "limit=20"

# 2. Next page: copy next_cursor from the response and add
#   --data-urlencode "cursor=NEXT_CURSOR"

Paginated: when has_more is true, send next_cursor as cursor to get the next page.

Models

GET

List models, optionally filtered by provider and template.

Base URL

GEThttps://api.durrun.com/api/models.php

Query parameters

NameTypeRequiredDefaultDescription
providerstringOptional—Provider slug: openai, sharpapi, recraft, grokai…
templatestringOptional—Template slug: image, video, voiceai, web, database…
limitintegerOptional20Results per page. Maximum 50.
cursorstringOptional—Page token. Use next_cursor from the previous response.

Request headers

HeaderValue
X-API-KEYYOUR_API_KEY
Acceptapplication/json

Example request

# 1. Request with base URL, parameters and headers
curl -G "https://api.durrun.com/api/models.php" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  --max-time 30 \
  --data-urlencode "provider=recraft" \
  --data-urlencode "template=image" \
  --data-urlencode "limit=20"

# 2. Next page: copy next_cursor from the response and add
#   --data-urlencode "cursor=NEXT_CURSOR"

Paginated: when has_more is true, send next_cursor as cursor to get the next page.

Model by ID & Language

GET

Get the integration code for one model in a specific programming language.

Base URL

GEThttps://api.durrun.com/api/model-code.php

Query parameters

NameTypeRequiredDefaultDescription
model_idintegerRequired—Model ID, as returned by Models or Query.
languagestringRequired—php, node, python, go, java, csharp, curl…
pageintegerOptional1Page number when the code spans several pages.

Request headers

HeaderValue
X-API-KEYYOUR_API_KEY
Acceptapplication/json

Example request

# 1. Request with base URL, parameters and headers
curl -G "https://api.durrun.com/api/model-code.php" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Accept: application/json" \
  --max-time 30 \
  --data-urlencode "model_id=95" \
  --data-urlencode "language=php" \
  --data-urlencode "page=1"