Devcasa AIDevelopers
OpenAI-compatible API

One API for every model that is live.

Use familiar OpenAI SDKs, discover the verified model catalog at runtime, and stream responses through one endpoint.

612 live models 4 providers OpenAI SDK compatible
Base URL https://ai.developpeurcasablanca.com/v1
01

Authentication

Send your developer key as a Bearer token with every request.

Keep keys on your server

Never expose a developer key in browser JavaScript, a mobile bundle or a public repository.

HTTP header
Authorization: Bearer dk_your_key_here
02

Quickstart

Replace the placeholder key and model with values from your account.

cURL · shell
curl https://ai.developpeurcasablanca.com/v1/chat/completions \
  -H "Authorization: Bearer dk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-id",
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'
Python · OpenAI SDK
from openai import OpenAI

client = OpenAI(
    api_key="dk_your_key_here",
    base_url="https://ai.developpeurcasablanca.com/v1",
)
reply = client.chat.completions.create(
    model="your-model-id",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

Do not hard-code a guessed model name: call GET /v1/models and use an ID returned for your key.

03

GET /v1/models

Returns only enabled models currently available to the provider keys behind the service.

cURL · shell
curl https://ai.developpeurcasablanca.com/v1/models \
  -H "Authorization: Bearer dk_your_key_here"
JSON · response200 OK
{
  "object": "list",
  "data": [{
    "id": "model-id",
    "object": "model"
  }]
}
04

POST /v1/chat/completions

Create a response with the same request shape used by OpenAI chat completions.

modelRequired

A model ID returned by /v1/models.

messagesRequired

An ordered list of role and content objects.

streamOptional

Set true to receive incremental server-sent events.

05

Streaming

Set stream to true to start receiving tokens as soon as they are generated.

Python · streaming
stream = client.chat.completions.create(
    model="your-model-id",
    messages=[{"role": "user", "content": "Write a haiku"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
06

Errors

Errors use standard HTTP status codes and a JSON error message.

StatusMeaningWhat to do
400Invalid requestCheck the JSON fields and model ID.
401Missing or invalid keyCreate or replace your developer key.
402Insufficient creditAdd prepaid API credit in your account.
429Too many requestsRetry with exponential backoff.
5xxTemporary service problemRetry safely after a short delay.

Ready to make your first call?

Create an account, issue a developer key, then discover the live models available to it.

Get an API key